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
@@ -23,23 +23,23 @@ class P {
fun foo() {
val p = P()
<!INVISIBLE_SETTER!>p.x<!> = 34 //should be an error here
p.x = 34 //should be an error here
p.y = 23
fun inner() {
<!INVISIBLE_SETTER!>p.x<!> = 44
p.x = 44
}
}
class R {
val p = P();
init {
<!INVISIBLE_SETTER!>p.x<!> = 42
p.x = 42
}
val testInGetterInOtherClass : Int
get() {
<!INVISIBLE_SETTER!>p.x<!> = 33
p.x = 33
return 3
}
}
@@ -50,4 +50,4 @@ fun test() {
<!UNRESOLVED_REFERENCE!>p<!>.x = 43
}
}
}
}
@@ -0,0 +1,36 @@
//KT-2960 Perform control flow checks for package property initializers
package b
class P {
var x : Int = 0
private set
}
val p = P()
var f = { -> p.x = 32 }
val o = object {
fun run() {
p.x = 4
val z : Int
doSmth(<!UNINITIALIZED_VARIABLE!>z<!>)
}
}
val g = { ->
val x: Int
doSmth(<!UNINITIALIZED_VARIABLE!>x<!>)
}
class A {
val a : Int = 1
get() {
val x : Int
doSmth(<!UNINITIALIZED_VARIABLE!>x<!>)
return field
}
}
fun doSmth(i: Int) = i
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
//KT-2960 Perform control flow checks for package property initializers
package b
@@ -0,0 +1,17 @@
open class X(s : String) {
public var n: String = s
private set
}
class Z : X("subclass") {
fun print(): String {
n = n
return n;
}
}
fun box() : String {
return Z().print() //error
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
open class X(s : String) {
public var n: String = s
private set