aboutsummaryrefslogtreecommitdiffstats
path: root/core/base.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-23 22:16:25 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-28 12:22:25 +0000
commit0b284ac60916142cadb8b65fa5ca9f9cffcfc200 (patch)
tree07fc75330d813d54751f42a2f55b979398929814 /core/base.moon
parentmerge Const and Stream into Value; Dataflow logic (diff)
downloadalive-0b284ac60916142cadb8b65fa5ca9f9cffcfc200.tar.gz
alive-0b284ac60916142cadb8b65fa5ca9f9cffcfc200.zip
lots of fixes
Diffstat (limited to 'core/base.moon')
-rw-r--r--core/base.moon4
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]}"