mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
26 lines
314 B
Plaintext
26 lines
314 B
Plaintext
var f = null
|
|
var g = null
|
|
|
|
{
|
|
var local = "local"
|
|
f = fn () {
|
|
System.print(local)
|
|
local = "after f"
|
|
System.print(local)
|
|
}
|
|
|
|
g = fn () {
|
|
System.print(local)
|
|
local = "after g"
|
|
System.print(local)
|
|
}
|
|
}
|
|
|
|
f()
|
|
// expect: local
|
|
// expect: after f
|
|
|
|
g()
|
|
// expect: after f
|
|
// expect: after g
|