Allow shadowing of global.

This commit is contained in:
Stephen Chung
2021-04-17 18:40:16 +08:00
parent 9a8da93145
commit eefdc09352
3 changed files with 72 additions and 19 deletions

View File

@@ -1,9 +1,11 @@
// This script defines a function with many parameters and calls it
const KEY = 38;
fn f(a, b, c, d, e, f) {
a - b * c - d * e - f
a - b * c - d * e - f + global::KEY
}
print("f() call should be 4:");
print("f() call should be 42:");
print(f(100, 5, 2, 9, 6, 32));