Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt
T
Pavel Kirpichenkov b161839092 [NI] Report unsafe implicit invoke accordingly to OI
This reverts commit df046683cc.
KT-30695
2020-02-14 18:06:34 +03:00

13 lines
232 B
Kotlin
Vendored

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)
}
}