Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt
T
2020-02-13 16:06:40 +03:00

14 lines
255 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
fun <E : String?, T : ((CharSequence) -> Unit)?> foo(x: E, y: T) {
if (x != null) {
y(x)
}
if (y != null) {
<!INAPPLICABLE_CANDIDATE!>y<!>(x)
}
if (x != null && y != null) {
y(x)
}
}