34e6649d31
Before this commit, nullable argument could match not null parameter. Now we require also correct nullability that breaks some cases
19 lines
347 B
Kotlin
Vendored
19 lines
347 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
|
|
|
fun <T : CharSequence?> bar1(x: T) {}
|
|
|
|
fun bar2(x: CharSequence?) {}
|
|
|
|
fun <T : CharSequence> bar3(x: T) {}
|
|
|
|
fun bar4(x: String) {}
|
|
|
|
fun <T : String?> foo(x: T) {
|
|
bar1(x)
|
|
bar2(x)
|
|
|
|
<!INAPPLICABLE_CANDIDATE!>bar3<!>(x)
|
|
<!INAPPLICABLE_CANDIDATE!>bar4<!>(x)
|
|
}
|