diff options
author | Li Jin <dragon-fly@qq.com> | 2020-02-03 15:44:20 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-02-03 15:44:20 +0800 |
commit | d75848152e337fc9d3a4041ec310fea07476c0a8 (patch) | |
tree | 22e74a062b8eaff1fd99f002c473ccdfd5181157 /spec | |
parent | d8901102a1e39e651b08b66257c176b5803b9bc0 (diff) | |
download | yuescript-d75848152e337fc9d3a4041ec310fea07476c0a8.tar.gz yuescript-d75848152e337fc9d3a4041ec310fea07476c0a8.tar.bz2 yuescript-d75848152e337fc9d3a4041ec310fea07476c0a8.zip |
fix some cases when using backcall with assignment.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/inputs/assign.moon | 4 | ||||
-rw-r--r-- | spec/inputs/backcall.moon | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/spec/inputs/assign.moon b/spec/inputs/assign.moon index e8fcbfd..dac2ba3 100644 --- a/spec/inputs/assign.moon +++ b/spec/inputs/assign.moon | |||
@@ -27,3 +27,7 @@ else | |||
27 | "nothing", "yeah" | 27 | "nothing", "yeah" |
28 | 28 | ||
29 | c, d = 1, 2 if true | 29 | c, d = 1, 2 if true |
30 | |||
31 | x = (do | ||
32 | f! | ||
33 | 123) if f = getHandler! | ||
diff --git a/spec/inputs/backcall.moon b/spec/inputs/backcall.moon index 7702059..c52fee3 100644 --- a/spec/inputs/backcall.moon +++ b/spec/inputs/backcall.moon | |||
@@ -58,4 +58,14 @@ do | |||
58 | <- f6 | 58 | <- f6 |
59 | f7! | 59 | f7! |
60 | 60 | ||
61 | do | ||
62 | result = do | ||
63 | (data)<- loadAsync "filename.txt" | ||
64 | print data | ||
65 | print result | ||
66 | |||
67 | totalSize = (for file in *files | ||
68 | (data)<-loadAsync file | ||
69 | addToCache file,data) |> reduce 0,(a,b)-> a+b | ||
70 | |||
61 | alert "hi" | 71 | alert "hi" |