Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check argument counts to nqp ops.
  • Loading branch information
jnthn committed Apr 22, 2012
1 parent 8475b80 commit 2d62455
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/QAST/Operations.nqp
Expand Up @@ -59,7 +59,10 @@ class QAST::Operations {
# Build the arguments list.
# XXX keyed
# XXX coercions/boxings/unboxings
# XXX count check
if +$op.list != +@arg_types {
pir::die("Operation '" ~ $op.op ~ "' requires " ~
+@arg_types ~ " operands, but got " ~ +$op.list);
}
for $op.list {
my $post := $qastcomp.as_post($_);
$ops.push($post);
Expand Down

0 comments on commit 2d62455

Please sign in to comment.