[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,31 @@
// !LANGUAGE: +NewInference
// !CHECK_TYPE
// FILE: Fn.java
public interface Fn<T, R> {
R apply(T t);
}
// FILE: Fn2.java
public interface Fn2<T, R> extends Fn<T, R> {}
// FILE: J.java
public interface J {
String foo(Fn<String, Object> f, Object o);
int foo(Fn<Object, Object> f, String s); // (Any) -> Any <: (String) -> Any <=> String <: Any
String bas(Fn<Object, Object> f, Object o);
int bas(Fn<Object, String> f, String s); // (Any) -> String <: (Any) -> Any <=> String <: Any
String bar(Fn<String, Object> f);
int bar(Fn2<String, Object> f); // Fn2 seems more specific one even function type same
}
// FILE: 1.kt
fun test(j: J) {
j.<!AMBIGUITY!>foo<!>({ <!UNRESOLVED_REFERENCE!>it<!> <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Any>() }; "" }, "") <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
j.<!AMBIGUITY!>bas<!>({ <!UNRESOLVED_REFERENCE!>it<!> <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Any>() }; "" }, "") <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
// NI: TODO
j.bar { it checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Any>() }; "" } checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
}