Skip to content

Commit

Permalink
bulletproof against nodes without .orig
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Dec 8, 2015
1 parent 7ab9ad5 commit d6370eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/moar/QAST/QASTCompilerMAST.nqp
Expand Up @@ -1133,7 +1133,7 @@ my class MASTCompilerInstance {

# Annotate with line number if we have one.
my $node := $_.node;
if nqp::isconcrete($node) {
if nqp::isconcrete($node) && nqp::can($node,'orig') {
my $line := HLL::Compiler.lineof($node.orig(), $node.from(), :cache(1));
nqp::push(@all_ins, MAST::Annotated.new(
:$!file, :$line, :instructions($last_stmt.instructions) ));
Expand Down

0 comments on commit d6370eb

Please sign in to comment.