Files
wren/test/language/variable/local_in_middle_of_block.wren
T

16 lines
281 B
Plaintext
Raw Normal View History

2013-11-09 11:38:01 -08:00
class Foo {
2015-09-01 08:16:04 -07:00
construct new() {}
2013-11-09 11:38:01 -08:00
bar {
var a = "a"
2015-09-15 07:46:09 -07:00
System.print(a) // expect: a
2013-11-09 11:38:01 -08:00
var b = a + " b"
2015-09-15 07:46:09 -07:00
System.print(b) // expect: a b
2013-11-09 11:38:01 -08:00
var c = a + " c"
2015-09-15 07:46:09 -07:00
System.print(c) // expect: a c
2013-11-09 11:38:01 -08:00
var d = b + " d"
2015-09-15 07:46:09 -07:00
System.print(d) // expect: a b d
2013-11-09 11:38:01 -08:00
}
}
2015-07-10 09:18:22 -07:00
Foo.new().bar