Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid another p6bindassert with Mu.
  • Loading branch information
jnthn committed Dec 6, 2013
1 parent 16da194 commit 84e430f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Perl6/Actions.nqp
Expand Up @@ -4687,15 +4687,17 @@ class Perl6::Actions is HLL::Actions does STDActions {
# Now go by scope.
if $target.scope eq 'attribute' {
# Source needs type check.
my $meta_attr;
my $type;
try {
$meta_attr := $*PACKAGE.HOW.get_attribute_for_usage(
$type := $*PACKAGE.HOW.get_attribute_for_usage(
$*PACKAGE, $target.name
);
).type;
}
unless $type =:= $*W.find_symbol(['Mu']) {
$source := QAST::Op.new(
:op('p6bindassert'),
$source, QAST::WVal.new( :value($type) ))
}
$source := QAST::Op.new(
:op('p6bindassert'),
$source, QAST::WVal.new( :value($meta_attr.type) ))
}
else {
# Probably a lexical.
Expand Down

0 comments on commit 84e430f

Please sign in to comment.