diff options
Diffstat (limited to 'core/base.moon')
| -rw-r--r-- | core/base.moon | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/base.moon b/core/base.moon index 60ee460..422e631 100644 --- a/core/base.moon +++ b/core/base.moon @@ -34,6 +34,10 @@ class Op assert_types: (...) => num = select '#', ... assert #@inputs >= num, "argument count mismatch" + @assert_first_types ... + + assert_first_types: (...) => + num = select '#', ... for i = 1, num expect = select i, ... assert @inputs[i].type == expect, "expected argument #{i} of #{@} to be of type #{expect} but found #{@inputs[i]}" |
