Files
wren/test/variable/scope_if.wren
Bob Nystrom b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00

14 lines
257 B
Plaintext

// Create a local scope for the 'then' expression.
var a = "out"
if (true) {
var a = "in"
}
IO.print(a) // expect: out
// Create a local scope for the 'else' expression.
var b = "out"
if (false) "dummy" else {
var b = "in"
}
IO.print(b) // expect: out