[NI] Improved testdata after changes in applicabilities
This commits introduces testdata changes, where NI behaviour strictly improved, after several previous fixes. For some tests, just WITH_NEW_INFERENCE directive was added. It indicates, that some of previous commits first introduced error in that test, and then some other commit fixed it (netting no overall testdata change). It is preferrably to keep those annotations until we will migrate to NI completely, to prevent unexpected regressions.
This commit is contained in:
+3
-3
@@ -9,7 +9,7 @@ fun foo(): Int {
|
||||
val d: Data<Int>? = null
|
||||
// An error must be here
|
||||
val (x, y) = <!COMPONENT_FUNCTION_ON_NULLABLE, COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
||||
return <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!><!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!><!>
|
||||
return <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!>
|
||||
}
|
||||
|
||||
data class NormalData<T>(val x: T, val y: T)
|
||||
@@ -17,6 +17,6 @@ data class NormalData<T>(val x: T, val y: T)
|
||||
fun bar(): Int {
|
||||
val d: NormalData<Int>? = null
|
||||
// An error must be here
|
||||
val (x, y) = <!NI;COMPONENT_FUNCTION_MISSING, NI;COMPONENT_FUNCTION_MISSING, OI;COMPONENT_FUNCTION_ON_NULLABLE, OI;COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
||||
return <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!><!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!><!>
|
||||
val (x, y) = <!COMPONENT_FUNCTION_ON_NULLABLE, COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
||||
return <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user