Add version requirements for declarations with !! types

^KT-26245 Related
This commit is contained in:
Denis.Zharkov
2021-04-08 14:44:44 +03:00
committed by TeamCityServer
parent 403406f92d
commit 37813d9d82
3 changed files with 101 additions and 3 deletions
@@ -0,0 +1,33 @@
package test
interface A<T> {
fun foo(x: T!!)
val w: T!!
}
class B<X>(r: X!!)
fun <K> inside() {
object : A<K> {
override fun foo(x: K!!) {
}
override val w: K!!
get() = TODO("")
}
}
fun <F> bar1(x: F!!) {}
fun <F> bar2(x: F) = x!!
val <E> E.nn: E!! get() = this!!
class Outer {
abstract class R1<T, F : T!!> : A<T!!>
abstract class R2<T, F : T!!> : A<T>
abstract class W<T> : A<T>
}
typealias Alias<R> = A<R!!>