Extend JvmWildcardSuppress annotation tests

^KT-61734
This commit is contained in:
Jinseong Jeon
2024-02-28 22:21:00 -08:00
committed by teamcity
parent 9c16c52564
commit d63b3e9494
4 changed files with 223 additions and 1 deletions
@@ -12,7 +12,6 @@ class Container {
@JvmSuppressWildcards(true)
fun deepOpen(x: Out<Out<Out<Open>>>) {}
@JvmSuppressWildcards(false)
fun bar(): Out<Open> = null!!
@@ -27,6 +26,32 @@ class Container {
@JvmSuppressWildcards(true)
fun bar(x: Boolean, y: In<Long>, z: @JvmSuppressWildcards(false) Long): Int = 1
@JvmSuppressWildcards(true)
fun Out<Out<Out<Open>>>.zoo(z: @JvmSuppressWildcards(false) Out<Open>) {}
}
class ContainerForPropertyAndAccessors {
@JvmSuppressWildcards(true)
val deepOpen: Out<Out<Out<Open>>> = TODO()
@JvmSuppressWildcards(false)
var bar: Out<Open> = TODO()
val simpleOut: Out<@JvmWildcard Final> = TODO()
val simpleIn: In<@JvmWildcard Any?> = TODO()
@JvmSuppressWildcards(true)
val Out<Out<Out<Open>>>.zoo: @JvmSuppressWildcards(false) Out<Open>
get() = TODO()
}
@JvmSuppressWildcards(true)
class HasAnnotation {
fun doesNot(p: Out<Out<Open>>) {}
fun parameterDisagrees(p: @JvmSuppressWildcards(false) Out<Int>) {}
}
interface A<T> {