Start to get instance fields working.

This commit is contained in:
Bob Nystrom
2013-11-23 14:55:05 -08:00
parent ba676f1231
commit a5bbe81280
11 changed files with 229 additions and 19 deletions
+9
View File
@@ -0,0 +1,9 @@
class Foo {
write { io.write(_field) } // Compile a use of the field...
init { _field = "value" } // ...before an assignment to it.
}
var foo = Foo.new
// But invoke them in the right order.
foo.init
foo.write // expect: value