diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-21 12:36:10 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-21 12:36:10 +0000 |
| commit | b12489e717c589e6f165f47769696ed200b58843 (patch) | |
| tree | 9bf5820c4761e8a6eeadf6cfb03c50e7a68f5bf9 /core/base | |
| parent | luajit compatibility (diff) | |
| download | alive-b12489e717c589e6f165f47769696ed200b58843.tar.gz alive-b12489e717c589e6f165f47769696ed200b58843.zip | |
lib/midi: luajit bit support
Diffstat (limited to 'core/base')
| -rw-r--r-- | core/base/match.moon | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/base/match.moon b/core/base/match.moon index cb82ac4..69d064d 100644 --- a/core/base/match.moon +++ b/core/base/match.moon @@ -43,8 +43,9 @@ class Pattern assert @opt or #matched > 0, Error 'argument', "expected at least one argument for spread" matched else - matches = @matches results[1] - assert @opt or matches, Error 'argument', "argument #{results[1].value} incompatible with expected type #{@}" + result = results[1] + matches = @matches result + assert @opt or matches, Error 'argument', "argument #{result and result\type!} incompatible with expected type #{@}" if matches then table.remove results, 1 __tostring: => |
