diff options
author | Li Jin <dragon-fly@qq.com> | 2022-04-06 18:03:49 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-04-06 18:03:49 +0800 |
commit | 9af15048c75e845d9f6f647a3ebe2f538fac995c (patch) | |
tree | 9745928383df49940d6e17a95c269a1ae91b82f5 /spec/outputs | |
parent | fe6ce26a58f23311cda3e82b3dfd3a55b9b16bc8 (diff) | |
download | yuescript-9af15048c75e845d9f6f647a3ebe2f538fac995c.tar.gz yuescript-9af15048c75e845d9f6f647a3ebe2f538fac995c.tar.bz2 yuescript-9af15048c75e845d9f6f647a3ebe2f538fac995c.zip |
allow doing mixin with a class and a table.
Diffstat (limited to 'spec/outputs')
-rw-r--r-- | spec/outputs/class.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/outputs/class.lua b/spec/outputs/class.lua index bb14ad8..f0482f9 100644 --- a/spec/outputs/class.lua +++ b/spec/outputs/class.lua | |||
@@ -1107,11 +1107,14 @@ do | |||
1107 | local _list_0 = { | 1107 | local _list_0 = { |
1108 | B, | 1108 | B, |
1109 | C, | 1109 | C, |
1110 | D | 1110 | D, |
1111 | { | ||
1112 | value = 123 | ||
1113 | } | ||
1111 | } | 1114 | } |
1112 | for _index_0 = 1, #_list_0 do | 1115 | for _index_0 = 1, #_list_0 do |
1113 | local _mixin_0 = _list_0[_index_0] | 1116 | local _mixin_0 = _list_0[_index_0] |
1114 | for _key_0, _val_0 in pairs(_mixin_0.__base) do | 1117 | for _key_0, _val_0 in pairs(_mixin_0.__class and _mixin_0.__base or _mixin_0) do |
1115 | if _base_0[_key_0] == nil then | 1118 | if _base_0[_key_0] == nil then |
1116 | _base_0[_key_0] = _val_0 | 1119 | _base_0[_key_0] = _val_0 |
1117 | end | 1120 | end |