Files
kotlin-fork/compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/onFunction.kt
T
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00

29 lines
602 B
Kotlin
Vendored

// WITH_STDLIB
class Out<out T>
class In<in R>
open class Open
@JvmSuppressWildcards(true)
fun deepOpen(x: Out<Out<Out<Open>>>) {}
// method: OnFunctionKt::deepOpen
// generic signature: (LOut<LOut<LOut<LOpen;>;>;>;)V
interface A<T> {
@JvmSuppressWildcards(true)
fun foo(): Out<T>
}
// method: A::foo
// generic signature: ()LOut<TT;>;
interface B {
@JvmSuppressWildcards(true)
fun foo(): In<Open>
}
// method: B::foo
// generic signature: ()LIn<LOpen;>;
@JvmSuppressWildcards(false)
fun bar(): Out<Open> = null!!
// method: OnFunctionKt::bar
// generic signature: ()LOut<+LOpen;>;