Fix tests in DiagnosticsTestWithStdLibGenerated with NI
This commit is contained in:
+1
-1
@@ -99,6 +99,6 @@ fun branchedAndNestedWithNativeOperators(x: Any?, y: Any?) {
|
||||
)
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -31,12 +31,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.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,13 +49,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.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ fun testDeMorgan(x: Any?) {
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ fun testDeMorgan2(x: Any?) {
|
||||
// x !is String || x !is Int
|
||||
if (notIsString(x) || notIsInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
|
||||
Vendored
+6
-6
@@ -42,17 +42,17 @@ fun truetrue(x: Any?) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.inc()
|
||||
}
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
|
||||
fun truefalse(x: Any?) {
|
||||
if (trueWhenString(x) && falseWhenInt(x)) {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,19 +63,19 @@ fun falsetrue(x: Any?) {
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun falsefalse(x: Any?) {
|
||||
if (falseWhenString(x) && falseWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!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.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
Vendored
+6
-6
@@ -36,18 +36,18 @@ fun falseWhenInt(x: Any?): Boolean {
|
||||
fun truetrue(x: Any?) {
|
||||
if (trueWhenString(x) || trueWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun truefalse(x: Any?) {
|
||||
if (trueWhenString(x) || falseWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
@@ -58,18 +58,18 @@ fun truefalse(x: Any?) {
|
||||
fun falsetrue(x: Any?) {
|
||||
if (falseWhenString(x) || trueWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
}
|
||||
|
||||
fun falsefalse(x: Any?) {
|
||||
if (falseWhenString(x) || falseWhenInt(x)) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||
}
|
||||
else {
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||
|
||||
Reference in New Issue
Block a user