Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt
T
Denis Zharkov f97cc0b62d FIR: Rework receivers processing in resolution
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity)
- Split CheckReceiver (dispatch part should only check nullability)
2020-11-16 15:50:39 +03:00

14 lines
262 B
Kotlin
Vendored

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