Support JvmSuppressWildcards and JvmWildcard annotations
#KT-9898 Fixed
This commit is contained in:
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
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;>;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
class OutPair<out T, out E>
|
||||
class Out<out F>
|
||||
class In<in H>
|
||||
|
||||
class X
|
||||
|
||||
fun simpleOut(x: Out<@JvmWildcard X>) {}
|
||||
// method: OnTypesKt::simpleOut
|
||||
// generic signature: (LOut<+LX;>;)V
|
||||
|
||||
fun simpleIn(x: In<@JvmWildcard Any?>) {}
|
||||
// method: OnTypesKt::simpleIn
|
||||
// generic signature: (LIn<-Ljava/lang/Object;>;)V
|
||||
|
||||
fun falseTrueFalse(): @JvmSuppressWildcards(false) OutPair<X, @JvmSuppressWildcards OutPair<Out<X>, Out<@JvmSuppressWildcards(false) X>>> = null!!
|
||||
// method: OnTypesKt::falseTrueFalse
|
||||
// generic signature: ()LOutPair<+LX;LOutPair<LOut<LX;>;LOut<+LX;>;>;>;
|
||||
|
||||
open class Open
|
||||
fun combination(): @JvmSuppressWildcards OutPair< Open, @JvmWildcard OutPair<Open, @JvmWildcard Out<Open>>> = null!!
|
||||
// method: OnTypesKt::combination
|
||||
// generic signature: ()LOutPair<LOpen;+LOutPair<LOpen;+LOut<LOpen;>;>;>;
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
class Out<out T>
|
||||
class In<in E>
|
||||
|
||||
@JvmSuppressWildcards(false)
|
||||
fun foo(x: Boolean, y: Out<Int>): Int = 1
|
||||
// method: PrimitiveTypesKt::foo
|
||||
// generic signature: (ZLOut<+Ljava/lang/Integer;>;)I
|
||||
|
||||
@JvmSuppressWildcards(true)
|
||||
fun bar(x: Boolean, y: In<Long>, z: @JvmSuppressWildcards(false) Long): Int = 1
|
||||
// method: PrimitiveTypesKt::bar
|
||||
// generic signature: (ZLIn<Ljava/lang/Long;>;J)I
|
||||
Reference in New Issue
Block a user