aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-03-14 13:46:17 +0800
committerLi Jin <dragon-fly@qq.com>2022-03-14 13:46:17 +0800
commit0055f2fdb169788a7796821d20c7fba2230ea9ae (patch)
tree24ecbf48a03e2d4690a51d66e087f4585d196754 /spec/inputs
parent985761356280bf8625a6568dd83822aae83edc8f (diff)
downloadyuescript-0055f2fdb169788a7796821d20c7fba2230ea9ae.tar.gz
yuescript-0055f2fdb169788a7796821d20c7fba2230ea9ae.tar.bz2
yuescript-0055f2fdb169788a7796821d20c7fba2230ea9ae.zip
fix more cases that global values are not being cached.
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/cond.yue11
-rw-r--r--spec/inputs/with.yue13
2 files changed, 24 insertions, 0 deletions
diff --git a/spec/inputs/cond.yue b/spec/inputs/cond.yue
index 42b22a7..773ef91 100644
--- a/spec/inputs/cond.yue
+++ b/spec/inputs/cond.yue
@@ -208,6 +208,17 @@ do
208 if :pi = math 208 if :pi = math
209 print pi 209 print pi
210 210
211do
212 if _M = {}
213 :Thing = _M
214 :a, :b = _M
215
216do
217 global _M
218 if _M = {}
219 :Thing = _M
220 :a, :b = _M
221
211nil 222nil
212 223
213 224
diff --git a/spec/inputs/with.yue b/spec/inputs/with.yue
index d88e109..fe140ac 100644
--- a/spec/inputs/with.yue
+++ b/spec/inputs/with.yue
@@ -121,3 +121,16 @@ do
121 with dad 121 with dad
122 .if "yes" 122 .if "yes"
123 y = .end.of.function 123 y = .end.of.function
124
125do
126 global mask
127 with? mask = SolidRect width: w, height: h, color: 0x66000000
128 .touchEnabled = true
129 .swallowTouches = true
130
131do
132 with? mask = SolidRect width: w, height: h, color: 0x66000000
133 .touchEnabled = true
134 .swallowTouches = true
135
136nil