<init>

Common
JVM
1.0
<init>(suppress: Boolean = true)
For JVM

Instructs the compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance, for example such as E of kotlin.collections.Collection which is declared with an out variance.

  • If the innermost applied @JvmSuppressWildcards has suppress=true and the type is not annotated with @JvmWildcard, 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.

See the Kotlin language documentation for more information.

For Common

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.