[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:
+2
-1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
@@ -97,6 +98,6 @@ fun branchedAndNestedWithNativeOperators(x: Any?, y: Any?) {
|
||||
)
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
|
||||
|
||||
+7
-6
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
@@ -29,12 +30,12 @@ fun intersectingInfo(x: Any?, y: Any?) {
|
||||
if ((isString(x) && y is String) || (!notIsString(x) && !notIsInt(y))) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,13 +48,13 @@ fun intersectingInfo2(x: Any?, y: Any?) {
|
||||
(!notIsString(x) && isString(y) && y is Int) ||
|
||||
(x is String && !notIsInt(y) && x is Int)) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
@@ -26,7 +27,7 @@ fun testDeMorgan(x: Any?) {
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +35,7 @@ fun testDeMorgan2(x: Any?) {
|
||||
// x !is String || x !is Int
|
||||
if (notIsString(x) || notIsInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
|
||||
Vendored
+7
-6
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
@@ -40,17 +41,17 @@ fun truetrue(x: Any?) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.inc()
|
||||
}
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
|
||||
fun truefalse(x: Any?) {
|
||||
if (trueWhenString(x) && falseWhenInt(x)) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,19 +62,19 @@ fun falsetrue(x: Any?) {
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun falsefalse(x: Any?) {
|
||||
if (falseWhenString(x) && falseWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
// Note that we can't argue that we have any of smartcasts here,
|
||||
// because we don't know which one of both arguments was 'false' to bring us here
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
|
||||
Vendored
+7
-6
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
@@ -34,18 +35,18 @@ fun falseWhenInt(x: Any?): Boolean {
|
||||
fun truetrue(x: Any?) {
|
||||
if (trueWhenString(x) || trueWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun truefalse(x: Any?) {
|
||||
if (trueWhenString(x) || falseWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
@@ -56,18 +57,18 @@ fun truefalse(x: Any?) {
|
||||
fun falsetrue(x: Any?) {
|
||||
if (falseWhenString(x) || trueWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun falsefalse(x: Any?) {
|
||||
if (falseWhenString(x) || falseWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ReturnsEffect
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user