backing fields resolve changed
KT-462 Consider allowing initializing properties via property names when it is safe KT-598 Allow to use backing fields after this expression
This commit is contained in:
@@ -137,14 +137,14 @@ class AnonymousInitializers(var a: String, val b: String) {
|
||||
|
||||
{
|
||||
<!VAL_REASSIGNMENT!>$i<!> = 13
|
||||
<!NO_BACKING_FIELD, VAL_REASSIGNMENT!>$j<!> = 30
|
||||
j = 34
|
||||
<!NO_BACKING_FIELD_CUSTOM_ACCESSORS!>$j<!> = 30
|
||||
<!VAL_REASSIGNMENT!>j<!> = 34
|
||||
}
|
||||
|
||||
val k: String
|
||||
{
|
||||
if (1 < 3) {
|
||||
<!INITIALIZATION_USING_BACKING_FIELD!>k<!> = "a"
|
||||
k = "a"
|
||||
}
|
||||
else {
|
||||
$k = "b"
|
||||
@@ -288,7 +288,7 @@ class TestObjectExpression() {
|
||||
val <!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>y<!> : Int
|
||||
{
|
||||
if (true)
|
||||
<!INITIALIZATION_USING_BACKING_FIELD!>x<!> = 12
|
||||
x = 12
|
||||
else
|
||||
$x = 1
|
||||
}
|
||||
@@ -349,4 +349,4 @@ fun test(m : M) {
|
||||
fun test1(m : M) {
|
||||
<!VAL_REASSIGNMENT!>m.x<!>++
|
||||
m.y--
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user