[FIR] Unwrap definitely not null when matching overrides

#KT-41984 Fixed
This commit is contained in:
Dmitriy Novozhilov
2020-09-21 15:19:40 +03:00
parent 08b5f3ddde
commit 4d5e54cab6
5 changed files with 74 additions and 2 deletions
+31
View File
@@ -0,0 +1,31 @@
// ISSUE: KT-41984
// FILE: A.java
import org.jetbrains.annotations.NotNull;
public abstract class A<T, V> {
@NotNull
public abstract String take(@NotNull V value);
@NotNull
public abstract String takeInv(@NotNull Inv<@NotNull V> value);
}
// FILE: main.kt
class Inv<T>
open class B<V> : A<Any, V>() {
override fun take(value: V): String {
return ""
}
override fun takeInv(value: Inv<V>): String = ""
}
fun test_1(b: B<Int>, x: Int, inv: Inv<Int>) {
b.take(x)
b.<!INAPPLICABLE_CANDIDATE!>take<!>(null)
b.takeInv(inv)
}