0d070f8ba9
Previously, it was led to plainly adding NullableType <: T constraint which silently led to successful call completion. What is suggested is just marking such initial constraint as unsuccessful. In K1, the error was reported just via additional type checking mechanism being run after call completion. ^KT-58665 Fixed
9 lines
169 B
Kotlin
Vendored
9 lines
169 B
Kotlin
Vendored
// ISSUE: KT-58665
|
|
|
|
fun <R, T : Any> use(x: String?, r: R, t: T) {
|
|
foo(<!TYPE_MISMATCH!>x<!>)
|
|
foo(<!TYPE_MISMATCH!>r<!>)
|
|
foo(t)
|
|
}
|
|
|
|
fun <W> foo(x: W & Any) {} |