Revert "[FIR] Implement INVISIBLE_SETTER"

This reverts commit b3d7ed56
This commit is contained in:
Ivan Kochurkin
2021-08-02 19:21:26 +03:00
parent b264a2e5dd
commit afb85026c4
39 changed files with 180 additions and 288 deletions
@@ -13,6 +13,6 @@ class B {
class C: A() {
init {
B.<!INVISIBLE_REFERENCE!>foo<!>() // Error: receiver is not suitable
B.foo() // Error: receiver is not suitable
}
}
@@ -21,8 +21,9 @@ class B : A() {
b.foo
b.bar = b.bar + ""
a.<!INVISIBLE_REFERENCE!>foo<!>
<!INVISIBLE_SETTER!>a.bar<!> = a.bar + ""
a.foo
// TODO: should be INVISIBLE_SETTER
a.bar = a.bar + ""
if (a is B) {
a.foo
@@ -31,13 +32,14 @@ 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.foo
// TODO: should be INVISIBLE_SETTER
d.x.bar = d.x.bar + ""
}
}
}
fun baz(a: A) {
a.<!INVISIBLE_REFERENCE!>foo<!>
<!INVISIBLE_SETTER!>a.bar<!> = a.bar + ""
a.bar = a.bar + ""
}
@@ -22,6 +22,7 @@ class B : A() {
b.bar = b.bar + ""
a.<!INVISIBLE_MEMBER!>foo<!>
// TODO: should be INVISIBLE_SETTER
a.<!INVISIBLE_SETTER!>bar<!> = a.bar + ""
if (a is B) {
@@ -32,6 +33,7 @@ class B : A() {
if (d.x is B) {
d.x.abc // Ok
d.x.<!INVISIBLE_MEMBER!>foo<!>
// TODO: should be INVISIBLE_SETTER
d.x.<!INVISIBLE_SETTER!>bar<!> = d.x.bar + ""
}
}
@@ -11,7 +11,7 @@ class Data(var x: A)
class B : A() {
fun baz(a: A, b: B, d: Data) {
a.<!INVISIBLE_REFERENCE!>foo<!> { }
a.foo { }
b.foo { }
@@ -20,7 +20,7 @@ class B : A() {
}
if (d.x is B) {
d.x.<!INVISIBLE_REFERENCE!>foo<!> {}
d.x.foo {}
}
}
}
@@ -11,8 +11,8 @@ fun BaseOuter.foo(): String = ""
class Derived : BaseOuter() {
fun test(foo: Foo) {
if (foo.base is Derived) {
foo.base.foo() checkType { _<String>() } // Resolved to extension
foo.base.<!INVISIBLE_REFERENCE!>bar<!>()
foo.base.foo() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><String>() } // Resolved to extension
foo.base.bar()
}
}
}
@@ -11,11 +11,11 @@ class Derived : Base() {
override fun bar() { }
protected fun baz(x: Base) {
x.<!INVISIBLE_REFERENCE!>foo<!>()
x.<!INVISIBLE_REFERENCE!>bar<!>()
x.foo()
x.bar()
x.<!INVISIBLE_REFERENCE!>x<!> = x.<!INVISIBLE_REFERENCE!>x<!> + 1
<!INVISIBLE_SETTER!>x.y<!> = x.y + 1
x.x = x.x + 1
x.y = x.y + 1
if (x is Derived) {
x.foo()