34e6649d31
Before this commit, nullable argument could match not null parameter. Now we require also correct nullability that breaks some cases
20 lines
451 B
Kotlin
Vendored
20 lines
451 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
class A<T : CharSequence>(x: T)
|
|
|
|
fun <E : CharSequence> foo1(x: E) {}
|
|
fun <E : CharSequence> E.foo2() {}
|
|
|
|
fun <F : String?> bar(x: F) {
|
|
<!INAPPLICABLE_CANDIDATE!>A<!>(x)
|
|
<!INAPPLICABLE_CANDIDATE!>A<!><F>(x)
|
|
|
|
<!INAPPLICABLE_CANDIDATE!>foo1<!>(x)
|
|
<!INAPPLICABLE_CANDIDATE!>foo1<!><F>(x)
|
|
|
|
x.<!INAPPLICABLE_CANDIDATE!>foo2<!>()
|
|
x.<!INAPPLICABLE_CANDIDATE!>foo2<!><F>()
|
|
}
|
|
|