FIR: Fix test data after making LHS of assignment an expression

KT-54648
This commit is contained in:
Kirill Rakhman
2023-01-16 09:55:03 +01:00
committed by Space Team
parent ace47c06a5
commit 1eb18f13bd
68 changed files with 372 additions and 117 deletions
@@ -0,0 +1,9 @@
class A<T> {
public var x: Int = 0
private set
}
fun main() {
val a = A<Any>()
a.<!INVISIBLE_SETTER!>x<!> = 1
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
class A<T> {
public var x: Int = 0
private set
@@ -7,4 +6,4 @@ class A<T> {
fun main() {
val a = A<Any>()
<!INVISIBLE_SETTER!>a.x<!> = 1
}
}
+1 -1
View File
@@ -8,6 +8,6 @@ class A {
class B() {
init {
<!INVISIBLE_SETTER!>A().<!INVISIBLE_REFERENCE!>a<!><!> = "Hello"
A().<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>a<!> = "Hello"
}
}
+1 -1
View File
@@ -6,6 +6,6 @@ class A(private var i: Int, var j: Int) {
}
fun test(a: A) {
<!INVISIBLE_SETTER!>a.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!><!>++
a.<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>i<!>++
a.j++
}
@@ -22,7 +22,7 @@ class B : A() {
b.bar = b.bar + ""
a.<!INVISIBLE_REFERENCE!>foo<!>
<!INVISIBLE_SETTER!>a.bar<!> = a.bar + ""
a.<!INVISIBLE_SETTER!>bar<!> = a.bar + ""
if (a is B) {
a.foo
@@ -32,12 +32,12 @@ class B : A() {
if (d.x is B) {
d.x.abc // Ok
d.x.<!INVISIBLE_REFERENCE!>foo<!>
<!INVISIBLE_SETTER!>d.x.bar<!> = d.x.bar + ""
d.x.<!INVISIBLE_SETTER!>bar<!> = d.x.bar + ""
}
}
}
fun baz(a: A) {
a.<!INVISIBLE_REFERENCE!>foo<!>
<!INVISIBLE_SETTER!>a.bar<!> = a.bar + ""
a.<!INVISIBLE_SETTER!>bar<!> = a.bar + ""
}
@@ -14,8 +14,8 @@ class Derived : Base() {
x.<!INVISIBLE_REFERENCE!>foo<!>()
x.<!INVISIBLE_REFERENCE!>bar<!>()
<!INVISIBLE_SETTER!>x.<!INVISIBLE_REFERENCE!>x<!><!> = x.<!INVISIBLE_REFERENCE!>x<!> + 1
<!INVISIBLE_SETTER!>x.y<!> = x.y + 1
x.<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>x<!> = x.<!INVISIBLE_REFERENCE!>x<!> + 1
x.<!INVISIBLE_SETTER!>y<!> = x.y + 1
if (x is Derived) {
x.foo()
@@ -54,7 +54,7 @@ open class C : T {
}
fun test4(c: C) {
<!INVISIBLE_SETTER!>c.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!><!>++
c.<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>i<!>++
}
class D : C() {