Add diagnostics to test data from NI
This commit is contained in:
+3
-3
@@ -6,7 +6,7 @@ interface A
|
||||
fun <T> emptyList(): List<T> = throw Exception()
|
||||
|
||||
fun test1() {
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyList<!>()
|
||||
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyList<!>()
|
||||
}
|
||||
|
||||
//--------------
|
||||
@@ -14,7 +14,7 @@ fun test1() {
|
||||
fun <T: A> emptyListOfA(): List<T> = throw Exception()
|
||||
|
||||
fun test2() {
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyListOfA<!>()
|
||||
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyListOfA<!>()
|
||||
}
|
||||
|
||||
//--------------
|
||||
@@ -22,7 +22,7 @@ fun test2() {
|
||||
fun <T: A, R: T> emptyStrangeMap(): Map<T, R> = throw Exception()
|
||||
|
||||
fun test3() {
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyStrangeMap<!>()
|
||||
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyStrangeMap<!>()
|
||||
}
|
||||
|
||||
//--------------
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ fun <T> foo(in1: In<T>, in2: In<T>): T = throw Exception("$in1 $in2")
|
||||
|
||||
fun test(inA: In<A>, inB: In<B>, inC: In<C>) {
|
||||
|
||||
<!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>foo<!>(inA, inB)
|
||||
<!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>foo<!>(inA, inB)
|
||||
|
||||
val r = foo(inA, inC)
|
||||
checkSubtype<C>(r)
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ class Client<T, X: Base<T>>(<!UNUSED_PARAMETER!>x<!>: X)
|
||||
|
||||
fun test() {
|
||||
val c = Client(StringBase()) // Type inference fails here for T.
|
||||
val <!UNUSED_VARIABLE!>i<!> : Int = <!TYPE_MISMATCH!>c<!>
|
||||
val <!UNUSED_VARIABLE!>i<!> : Int = <!NI;TYPE_MISMATCH, TYPE_MISMATCH!>c<!>
|
||||
}
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ fun <T> checkItIsExactlyAny(<!UNUSED_PARAMETER!>t<!>: T, <!UNUSED_PARAMETER!>l<!
|
||||
fun <V : U, U> baz(<!UNUSED_PARAMETER!>v<!>: V, u: MutableSet<U>) = u
|
||||
|
||||
fun test(a: Any, s: MutableSet<String>) {
|
||||
<!TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>baz<!>(a, s)
|
||||
<!OI;TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>baz<!>(a, <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>s<!>)
|
||||
}
|
||||
|
||||
//from standard library
|
||||
|
||||
Reference in New Issue
Block a user