Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
compile-time dispatch shall inspect a Want node's WVal.
  • Loading branch information
timo committed Sep 14, 2015
1 parent b3d2f2a commit 934893b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Perl6/Optimizer.nqp
Expand Up @@ -1637,6 +1637,11 @@ class Perl6::Optimizer {

# See if we know the node's type; if so, check it.
my $type := $_.returns();
if $type =:= NQPMu {
if nqp::istype($_, QAST::Want) && nqp::istype($_[0], QAST::WVal) {
$type := $_[0].value.WHAT;
}
}
my $ok_type := 0;
try $ok_type := nqp::istype($type, $!symbols.Mu) &&
$type.HOW.archetypes.nominal();
Expand Down

0 comments on commit 934893b

Please sign in to comment.