Omar
07/11/2024, 4:30 PM@JvmOverloads
annotation not no-op for wasmJs compilations, but does so for native?
I have a multiplatform project that currently targets native code only. In my common folder, I have an expect class defined as follows:
public expect class ArraySet<E> @JvmOverloads constructor(capacity: Int = 0)
This class uses the @JvmOverloads annotation. In the actual class implementation for the native target, I also use the @JvmOverloads annotation:
public actual class ArraySet<E> @kotlin.jvm.JvmOverloads actual constructor(capacity: Int)
This compiles without any errors.
Now, I want to add support for wasmJs. However, when I declare the actual class for wasmJs in a similar manner and compile the code, I encounter the following error:
Declaration annotated with '@OptionalExpectation' can only be used in common module sources
As a result of adding the JvmOverload annotation. Is this WAI?Alan Viverette
07/11/2024, 4:32 PM