Right now, this example prints 106:
z = 3
f = x -> x + y + z
y = 5
z = 100
println (f 1) -- 106
z is marked as resolved and f captures its reference, so it later evaluates to 100 when f is called. y is properly hoisted such that it evaluates to 5 in the closure.
Instead, this should be a compile time failure since z is marked as immutable by f's capture.
Discord thread: https://discordapp.com/channels/651996477333438474/730624907607539722/904815689154564227
Right now, this example prints 106:
zis marked as resolved andfcaptures its reference, so it later evaluates to100whenfis called.yis properly hoisted such that it evaluates to 5 in the closure.Instead, this should be a compile time failure since
zis marked as immutable byf's capture.Discord thread: https://discordapp.com/channels/651996477333438474/730624907607539722/904815689154564227