aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/with_scope_shadow.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
commitf1454bbbd13a71da2005ff789cde2da0e9eb81f6 (patch)
tree37131187f4218dd3ebec049101c28a161e7ca289 /spec/inputs/with_scope_shadow.yue
parent604a8e5e53cdc7391a502fcabf07e8f1cc2a778c (diff)
downloadyuescript-main.tar.gz
yuescript-main.tar.bz2
yuescript-main.zip
Adding tests.HEADmain
Diffstat (limited to 'spec/inputs/with_scope_shadow.yue')
-rw-r--r--spec/inputs/with_scope_shadow.yue12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/inputs/with_scope_shadow.yue b/spec/inputs/with_scope_shadow.yue
new file mode 100644
index 0000000..a0d58cc
--- /dev/null
+++ b/spec/inputs/with_scope_shadow.yue
@@ -0,0 +1,12 @@
1target = {
2 val: 1
3 add: (n)=>
4 @val += n
5 @val
6}
7
8result = with target
9 val = 100
10 add 2
11
12print result, target.val