IR: support buildSimpleType for IrCapturedType
To make it possible to change nullability of IrCapturedType and change its annotations, which is happening when determining overridability of functions via IR. #KT-63437 Fixed
This commit is contained in:
committed by
Space Team
parent
8379e48e33
commit
471f25abfc
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// FILE: A.java
|
||||
|
||||
interface A {
|
||||
X<? extends A> foo();
|
||||
|
||||
interface X<T extends A> {}
|
||||
}
|
||||
|
||||
interface B extends A {
|
||||
@Override
|
||||
Y<? extends B> foo();
|
||||
|
||||
interface Y<U extends B> extends X<U> {}
|
||||
}
|
||||
|
||||
class BImpl implements B {
|
||||
@Override
|
||||
public Y<? extends B> foo() { return null; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
private class D : A, BImpl()
|
||||
|
||||
fun box(): String =
|
||||
if (D().foo() == null) "OK" else "Fail"
|
||||
Reference in New Issue
Block a user