4726dcce40
In order to make resolution still work for members not available from `Nothing`, we track the type without `Nothing?` and use that for resolution instead.
30 lines
427 B
Kotlin
Vendored
30 lines
427 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
// FILE: B.java
|
|
|
|
public abstract class B<T> implements A<T> {}
|
|
|
|
// FILE: test.kt
|
|
|
|
interface A<T> {
|
|
val content: T
|
|
}
|
|
fun f(x: Any?) {}
|
|
fun f(x: Byte) {}
|
|
fun f(x: Char) {}
|
|
|
|
fun g(i: Int) {}
|
|
|
|
fun g(x: B<Int>) {
|
|
val y = x.content
|
|
if (y == null) {
|
|
f(y)
|
|
<!NONE_APPLICABLE!>g<!>(y)
|
|
}
|
|
|
|
if (y is Nothing?) {
|
|
f(y)
|
|
<!NONE_APPLICABLE!>g<!>(y)
|
|
}
|
|
}
|