JvmSuppressWildcards

expect annotation class JvmSuppressWildcards(suppress: Boolean)

Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance, for example such as Collection<out T> has.

If the innermost applied @JvmSuppressWildcards has suppress=true, the type is generated without wildcards. If the innermost applied @JvmSuppressWildcards has suppress=false, the type is generated with wildcards.

It may be helpful only if declaration seems to be inconvenient to use from Java.

actual annotation class JvmSuppressWildcards(suppress: Boolean)

Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance, for example such as Collection<out T> has.

If the innermost applied @JvmSuppressWildcards has suppress=true, the type is generated without wildcards. If the innermost applied @JvmSuppressWildcards has suppress=false, the type is generated with wildcards.

It may be helpful only if declaration seems to be inconvenient to use from Java.

Constructors

JvmSuppressWildcards
Link copied to clipboard
expect fun JvmSuppressWildcards(suppress: Boolean = true)
actual fun JvmSuppressWildcards(suppress: Boolean = true)

Properties

suppress
Link copied to clipboard
expect val suppress: Boolean = true
actual val suppress: Boolean = true