Fix test data around flexibility after ae39d748e4
This commit is contained in:
committed by
Victor Petukhov
parent
dc2a9cdc81
commit
b8aacf0786
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// Issue: KT-36254
|
||||
|
||||
// FILE: Convertor.java
|
||||
|
||||
public interface Convertor<Src, Dst> {
|
||||
Dst convert(Src o);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun takeConvertor(c: Convertor<String, String>) {}
|
||||
|
||||
fun main() {
|
||||
takeConvertor(Convertor { null })
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// Issue: KT-36254
|
||||
|
||||
// FILE: Convertor.java
|
||||
|
||||
public interface Convertor<Src, Dst> {
|
||||
Out<Dst> convert(Out<Src> o);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun takeConvertor(c: Convertor<String, String>) {}
|
||||
|
||||
class Out<out T> {}
|
||||
|
||||
fun main(o: Out<Nothing?>) {
|
||||
takeConvertor(Convertor { o })
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// ERROR: Type mismatch: inferred type is (Any?..Any?) but String was expected
|
||||
// ERROR: Type mismatch: inferred type is (Any?..Any?) but String was expected
|
||||
// ERROR: Type mismatch: inferred type is (Any?..Any?) but String! was expected
|
||||
// ERROR: Type mismatch: inferred type is (Any?..Any?) but String! was expected
|
||||
// ERROR: Type mismatch: inferred type is HashMap<String, Any?> but Map<String, String> was expected
|
||||
import java.util.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user