refactoring & KT-607 Val reassignment is not marked as an error
This commit is contained in:
+2
-2
@@ -137,8 +137,8 @@ class AnonymousInitializers(var a: String, val b: String) {
|
||||
|
||||
{
|
||||
<!VAL_REASSIGNMENT!>$i<!> = 13
|
||||
<!NO_BACKING_FIELD!>$j<!> = 30
|
||||
<!VAL_REASSIGNMENT!>j<!> = 34
|
||||
<!NO_BACKING_FIELD, VAL_REASSIGNMENT!>$j<!> = 30
|
||||
j = 34
|
||||
}
|
||||
|
||||
val k: String
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//KT-607 Val reassignment is not marked as an error
|
||||
|
||||
namespace kt607
|
||||
|
||||
fun foo(a: A) {
|
||||
val o = object {
|
||||
val y : Int
|
||||
get() = 42
|
||||
}
|
||||
|
||||
<!VAL_REASSIGNMENT!>a.z<!> = 23
|
||||
<!VAL_REASSIGNMENT!>o.y<!> = 11 //Should be an error here
|
||||
}
|
||||
|
||||
class A() {
|
||||
val z : Int
|
||||
get() = 3
|
||||
}
|
||||
Reference in New Issue
Block a user