FIR: Adjust override checker to definitely-not-nullable types
^KT-52201 Related
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
// FILE: Base.java
|
||||
public class Base<T extends CharSequence> {
|
||||
public T foo(T t) { return t; }
|
||||
}
|
||||
|
||||
// FILE: Derived.java
|
||||
public class Derived<E extends CharSequence> extends Base<E> {
|
||||
@Override
|
||||
public E foo(CharSequence e) {
|
||||
return (E) "";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun main(d: Derived<CharSequence>) {
|
||||
d.foo("")
|
||||
}
|
||||
-2
@@ -2,8 +2,6 @@ public abstract interface OverrideWithErasedParameter : R|kotlin/Any| {
|
||||
public abstract interface Sub<T : R|ft<kotlin/Any, kotlin/Any?>|> : R|test/OverrideWithErasedParameter.Super<ft<T & Any, T?>>| {
|
||||
public abstract fun foo(o: R|ft<kotlin/Any, kotlin/Any?>|): R|kotlin/Unit|
|
||||
|
||||
public abstract fun foo(t: R|ft<T & Any, T?>|): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public abstract interface Super<T : R|ft<kotlin/Any, kotlin/Any?>|> : R|kotlin/Any| {
|
||||
public abstract fun foo(t: R|ft<T & Any, T?>|): R|kotlin/Unit|
|
||||
|
||||
Reference in New Issue
Block a user