diff options
| author | Li Jin <dragon-fly@qq.com> | 2022-03-14 13:46:17 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2022-03-14 13:46:17 +0800 |
| commit | 0055f2fdb169788a7796821d20c7fba2230ea9ae (patch) | |
| tree | 24ecbf48a03e2d4690a51d66e087f4585d196754 /spec/inputs | |
| parent | 985761356280bf8625a6568dd83822aae83edc8f (diff) | |
| download | yuescript-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.yue | 11 | ||||
| -rw-r--r-- | spec/inputs/with.yue | 13 |
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 | ||
| 211 | do | ||
| 212 | if _M = {} | ||
| 213 | :Thing = _M | ||
| 214 | :a, :b = _M | ||
| 215 | |||
| 216 | do | ||
| 217 | global _M | ||
| 218 | if _M = {} | ||
| 219 | :Thing = _M | ||
| 220 | :a, :b = _M | ||
| 221 | |||
| 211 | nil | 222 | nil |
| 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 | |||
| 125 | do | ||
| 126 | global mask | ||
| 127 | with? mask = SolidRect width: w, height: h, color: 0x66000000 | ||
| 128 | .touchEnabled = true | ||
| 129 | .swallowTouches = true | ||
| 130 | |||
| 131 | do | ||
| 132 | with? mask = SolidRect width: w, height: h, color: 0x66000000 | ||
| 133 | .touchEnabled = true | ||
| 134 | .swallowTouches = true | ||
| 135 | |||
| 136 | nil | ||
