$field is only allowed in property accessors

This commit is contained in:
Andrey Breslav
2011-04-20 16:25:35 +04:00
parent 9add2b6114
commit ca579e25b7
3 changed files with 21 additions and 3 deletions
+10
View File
@@ -8,3 +8,13 @@
val xx : Int = 1 + x
get() : Int = 1
<error>set(ref value : Long) {$x = value}</error>
class Test {
var a : Int
var b : Int get() = <error>$a</error>; set(x) {a = x; <error>$a</error> = x}
this() {
<error>$b</error> = <error>$a</error>
a = <error>$b</error>
}
}