6a03f31e50
Previously unsafe call is reported as part of InapplicableWrongReceiver. This makes it difficult for the downstream checkers to report different diagnostics.
14 lines
267 B
Kotlin
Vendored
14 lines
267 B
Kotlin
Vendored
fun <E : String?, T : ((CharSequence) -> Unit)?> foo(x: E, y: T) {
|
|
if (x != null) {
|
|
<!UNSAFE_IMPLICIT_INVOKE_CALL!>y<!>(x)
|
|
}
|
|
|
|
if (y != null) {
|
|
y(<!ARGUMENT_TYPE_MISMATCH!>x<!>)
|
|
}
|
|
|
|
if (x != null && y != null) {
|
|
y(x)
|
|
}
|
|
}
|