Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix .= initialization of attributes for types w/ :: in name
The Perl6::World needs all namespace parts as separate strings in the
Array, but currently it shoves the entire name as one item, which makes
World fail to find the needed type.

Fix by splitting the name on `::` before handing it to World.

Bug find: https://irclog.perlgeek.de/perl6/2017-01-23#i_13976744
  • Loading branch information
zoffixznet committed Jan 23, 2017
1 parent 6dd542f commit 700a077
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -2895,7 +2895,9 @@ class Perl6::Actions is HLL::Actions does STDActions {
$initast, $*ATTR_INIT_BLOCK);
}
elsif $<initializer><sym> eq '.=' {
my $type := $*W.find_symbol([ $*OFTYPE // 'Any']);
my $type := $*W.find_symbol(
nqp::split('::', $*OFTYPE // 'Any')
);
my $dot_equals := $initast;
$dot_equals.unshift(QAST::WVal.new(:value($type)));
$dot_equals.returns($type);
Expand Down

0 comments on commit 700a077

Please sign in to comment.