Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[js] HACK around a bug in NQP.
We need to figure out why sometimes the for op gets a child with a declaration blocktype.
  • Loading branch information
pmurias committed Oct 23, 2015
1 parent af86b80 commit 7c502f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -1078,6 +1078,12 @@ class QAST::OperationsJS {
unless nqp::istype(@operands[1], QAST::Block) {
nqp::die("Operation 'for' expects a block as its second operand");
}

unless @operands[1].blocktype eq 'immediate' {
# HACK - figure out how other a declaration blocktype gets here
# nqp::die("Operation 'for' expects the block to have blocktype to be immediate, is: {@operands[1].blocktype}");
@operands[1].blocktype('immediate');
}

my $iterator := $*BLOCK.add_tmp();

Expand Down

0 comments on commit 7c502f6

Please sign in to comment.