diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/inputs/metatable.yue | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/inputs/metatable.yue b/spec/inputs/metatable.yue index 6f7b418..13ea917 100644 --- a/spec/inputs/metatable.yue +++ b/spec/inputs/metatable.yue | |||
@@ -1,6 +1,8 @@ | |||
1 | a = close: true, close#: => print "out of scope" | 1 | a = close: true, close#: => print "out of scope" |
2 | b = add#: (left, right)-> right - left | 2 | b = add#: (left, right)-> right - left |
3 | c = key1: true, :add#, key2: true | 3 | c = key1: true, :add#, key2: true |
4 | w = [name]#:123, ["new"]#:(val)=> {val} | ||
5 | w.#["new"] w.#[name] | ||
4 | 6 | ||
5 | close _ = close#: -> print "out of scope" | 7 | close _ = close#: -> print "out of scope" |
6 | 8 | ||
@@ -40,4 +42,10 @@ tb\func# list | |||
40 | 42 | ||
41 | import "module" as :index#, newindex#:setFunc | 43 | import "module" as :index#, newindex#:setFunc |
42 | 44 | ||
45 | with tb | ||
46 | print .add#, .x\index# "key" | ||
47 | a = .index#.add#\new# 123 | ||
48 | b = t#.close#.test | ||
49 | c = t #.close# .test | ||
50 | |||
43 | nil | 51 | nil |