Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a few thinkos in lexicalref compilation.
  • Loading branch information
jnthn committed Feb 28, 2015
1 parent 42da59a commit e6b895e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/vm/jvm/QAST/Compiler.nqp
Expand Up @@ -4207,10 +4207,11 @@ class QAST::CompilerJAST {
# It is. Nothing more to do.
$local := 1;
}
elsif nqp::defined($type) {
elsif nqp::defined($reftype) {
# It is, and also a ref. Nothing more to do.
$local := 1;
$ref := 1;
$type := $RT_OBJ;
}
elsif $scope eq 'lexical' || $scope eq 'typevar' {
# Try to find it in an outer scope.
Expand Down Expand Up @@ -4314,7 +4315,7 @@ class QAST::CompilerJAST {
# Need to de-ref the container.
$il.append($ALOAD_1);
$il.append(JAST::Instruction.new( :op('invokestatic'), $TYPE_OPS,
"decont_$c", $jtype, $TYPE_SMO, $TYPE_TC ));
"decont_{typechar($reftype)}", jtype($reftype), $TYPE_SMO, $TYPE_TC ));
}

return result($il, $type);
Expand All @@ -4331,7 +4332,7 @@ class QAST::CompilerJAST {
# It is. Nothing more to do.
$local := 1;
}
elsif nqp::defined($type) {
elsif nqp::defined($reftype) {
# It is, and also a ref. Nothing more to do.
$local := 1;
$ref := 1;
Expand Down

0 comments on commit e6b895e

Please sign in to comment.