[FIR] Don't lose flexible types during capturing from expression
This commit is contained in:
committed by
Space Team
parent
06e88b559a
commit
eb8ce449e3
-22
@@ -1,22 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Clazz.java
|
||||
public class Clazz<T> {
|
||||
public T getT() { return null; }
|
||||
public Clazz<? super T> getSuperClass() { return null; }
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun test(clazz: Clazz<*>) {
|
||||
clazz.t checkType { _<Any?>() }
|
||||
clazz.getSuperClass() checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Clazz<*>?>() }
|
||||
clazz.getSuperClass().t checkType { _<Any?>() }
|
||||
|
||||
clazz.superClass checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Clazz<*>?>() }
|
||||
clazz.superClass.t checkType { _<Any?>() }
|
||||
|
||||
// See KT-9294
|
||||
if (clazz.superClass == null) {
|
||||
throw NullPointerException()
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
|
||||
// FILE: Clazz.java
|
||||
|
||||
Reference in New Issue
Block a user