[FIR] Fix wrong ConstantReference for returnsNotNull in EffectExtractor

This commit is contained in:
Oleg Ivanov
2020-07-28 15:53:50 +03:00
parent f6f3787b51
commit 7da94cc299
11 changed files with 40 additions and 40 deletions
@@ -68,12 +68,12 @@ fun nested2(x: Any?) {
fun nested3(x: Any?) {
myAssert(equalsTrue(notEqualsNull(nullWhenNotString(x))))
x.<!UNRESOLVED_REFERENCE!>length<!>
x.length
}
fun branchedAndNested(x: Any?, y: Any?) {
myAssert(equalsTrue(notEqualsNull(nullWhenNotString(x))) && equalsTrue(isString(y)))
x.<!UNRESOLVED_REFERENCE!>length<!>
x.length
y.length
}
@@ -97,7 +97,7 @@ fun branchedAndNestedWithNativeOperators(x: Any?, y: Any?) {
&&
(1 == 2 || y is Int || isString(y))
)
x.<!UNRESOLVED_REFERENCE!>length<!>
x.length
y.length
y.inc()
}
@@ -14,17 +14,17 @@ fun nullWhenNull(x: Int?): Int? {
fun testNullWhenNull(x: Int?) {
if (nullWhenNull(x) == null) {
x.dec()
x.<!AMBIGUITY!>dec<!>()
}
else {
x.<!AMBIGUITY!>dec<!>()
x.dec()
}
if (nullWhenNull(x) != null) {
x.<!AMBIGUITY!>dec<!>()
x.dec()
}
else {
x.dec()
x.<!AMBIGUITY!>dec<!>()
}
x.<!AMBIGUITY!>dec<!>()