Generate correct code for locals.

This commit is contained in:
Bob Nystrom
2013-11-09 11:38:01 -08:00
parent a2f0e41bcb
commit 0cc5524249
9 changed files with 64 additions and 16 deletions
+14
View File
@@ -0,0 +1,14 @@
class Foo {
bar {
var a = "a"
io.write(a) // expect: a
var b = a + " b"
io.write(b) // expect: a b
var c = a + " c"
io.write(c) // expect: a c
var d = b + " d"
io.write(d) // expect: a b d
}
}
Foo.new.bar