https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
r

Robert Jaros

03/01/2024, 3:20 PM
Already asked this in #webassembly but I've got no answer. I'm using Kotlin
2.0.0-Beta4
and my build log is full of warnings:
This code uses error suppression for 'EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE'. While it might compile and work, the compiler behavior is UNSPECIFIED and WON'T BE PRESERVED. Please report your use case to the Kotlin issue tracker instead: <https://kotl.in/issue>
. Is there any way to suppress these suppression warnings?
k

kirillrakhman

03/01/2024, 3:36 PM
Why do you need error suppression in your code?
r

Robert Jaros

03/01/2024, 3:36 PM
k

kirillrakhman

03/01/2024, 3:38 PM
You can use the compiler argument
-Xdont-warn-on-error-suppression
.
r

Robert Jaros

03/01/2024, 3:41 PM
How to use multiple arguments? I've tried
freeCompilerArgs.add("-Xexpect-actual-classes -Xdont-warn-on-error-suppression")
and I have
Flag is not supported by this version of the compiler: -Xexpect-actual-classes -Xdont-warn-on-error-suppression
k

kirillrakhman

03/01/2024, 3:41 PM
You probably need to pass them separately, not with a space in between.
r

Robert Jaros

03/01/2024, 3:43 PM
Works great! Thank you! 🙂
k

kirillrakhman

03/01/2024, 3:43 PM
Ideally, you wouldn't need it. But thank you for reporting your use case.
r

Robert Jaros

03/01/2024, 3:43 PM
Now I can see other warnings to deal with 😉