Add version requirements for declarations with !! types
^KT-26245 Related
This commit is contained in:
committed by
TeamCityServer
parent
403406f92d
commit
37813d9d82
@@ -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!!>
|
||||
Reference in New Issue
Block a user