FIR: Adjust override checker to definitely-not-nullable types

^KT-52201 Related
This commit is contained in:
Denis.Zharkov
2022-04-27 10:05:16 +03:00
committed by teamcity
parent 21b86123e8
commit c766f20554
8 changed files with 67 additions and 10 deletions
@@ -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,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|