refactoring & KT-607 Val reassignment is not marked as an error

This commit is contained in:
svtk
2011-11-25 15:14:38 +04:00
parent 2fcc18f08b
commit c3447c3576
8 changed files with 228 additions and 169 deletions
@@ -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
}