diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-02-23 22:16:25 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-02-28 12:22:25 +0000 |
| commit | 0b284ac60916142cadb8b65fa5ca9f9cffcfc200 (patch) | |
| tree | 07fc75330d813d54751f42a2f55b979398929814 /core/base.moon | |
| parent | merge Const and Stream into Value; Dataflow logic (diff) | |
| download | alive-0b284ac60916142cadb8b65fa5ca9f9cffcfc200.tar.gz alive-0b284ac60916142cadb8b65fa5ca9f9cffcfc200.zip | |
lots of fixes
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]}" |
