Add diagnostics to test data from NI
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ package c
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
fun Array<Int>.toIntArray(): IntArray = this.<!TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>mapTo<!>(IntArray(size), {it})
|
||||
fun Array<Int>.toIntArray(): IntArray = this.<!NI;TYPE_MISMATCH!><!OI;TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>mapTo<!>(<!NI;TYPE_MISMATCH!>IntArray(size)<!>, {<!NI;TYPE_MISMATCH!>it<!>})<!>
|
||||
|
||||
fun Array<Int>.toArrayList(): ArrayList<Int> = this.mapTo(ArrayList<Int>(size), {it})
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -9,8 +9,8 @@ inline fun <reified T> foo2(f: (T) -> Unit): Foo<T> = Foo()
|
||||
|
||||
fun test1() {
|
||||
val f1: Foo<out Int> = foo1 { it checkType { _<Int>() } }
|
||||
val f2: Foo<in Nothing> = foo1 { it <!UNREACHABLE_CODE!>checkType { _<Nothing>() }<!> }
|
||||
val f2: Foo<in Nothing> = foo1 { it <!UNREACHABLE_CODE!>checkType { <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Nothing>() }<!> }
|
||||
|
||||
val f3: Foo<out Int> = foo2 { it checkType { _<Int>() } }
|
||||
val f4: Foo<in Nothing> = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo2<!> { it <!UNREACHABLE_CODE!>checkType { _<Nothing>() }<!> }
|
||||
val f4: Foo<in Nothing> = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo2<!> { it <!UNREACHABLE_CODE!>checkType { <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Nothing>() }<!> }
|
||||
}
|
||||
@@ -16,6 +16,6 @@ class C<X, Z, Y : X>
|
||||
|
||||
class D<X, Z, Y : X>(<!UNUSED_PARAMETER!>foo<!>: C<X, Z, Y>) {
|
||||
fun test(a: C<Y, Y, Y>) {
|
||||
val d: D<X, Y, Y> = <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>D(a)<!>
|
||||
val d: D<X, Y, Y> = <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, OI;TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>D(a)<!>
|
||||
}
|
||||
}
|
||||
@@ -9,5 +9,5 @@ fun <T: Inv2<T>> foo(klass: Inv<T>): String? = null
|
||||
fun <X> bar(): Inv<X> = null!!
|
||||
|
||||
fun test() {
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>())
|
||||
<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>())
|
||||
}
|
||||
Vendored
+2
-2
@@ -18,8 +18,8 @@ fun test(out: Out<Int>, i: In<Int>, inv: A<Int>) {
|
||||
r checkType { _<Int>() }
|
||||
|
||||
// T? <: Int => error
|
||||
<!TYPE_INFERENCE_INCORPORATION_ERROR!>doIn<!>(<!TYPE_MISMATCH!>i<!>)
|
||||
<!OI;TYPE_INFERENCE_INCORPORATION_ERROR!>doIn<!>(<!TYPE_MISMATCH!>i<!>)
|
||||
|
||||
// T? >: Int => error
|
||||
<!TYPE_INFERENCE_INCORPORATION_ERROR!>doA<!>(<!TYPE_MISMATCH!>inv<!>)
|
||||
<!OI;TYPE_INFERENCE_INCORPORATION_ERROR!>doA<!>(<!TYPE_MISMATCH!>inv<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user