Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for autoviv Typed hash problem
As suggested by jnthn.  I think there is a ticket for this, but do not know
its number.
  • Loading branch information
lizmat committed May 19, 2013
1 parent 2a04f23 commit 0f88d34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -153,7 +153,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
%info<container_base> := $*W.find_symbol(['Hash']);
%info<bind_constraint> := $*W.find_symbol(['Associative']);
if $shape {
@value_type[0] := $*W.find_symbol(['Mu']) unless +@value_type;
@value_type[0] := $*W.find_symbol(['Any']) unless +@value_type;
my $shape_ast := $shape[0].ast;
if $shape_ast.isa(QAST::Stmts) && +@($shape_ast) == 1 && $shape_ast[0].has_compile_time_value {
@value_type[1] := $shape_ast[0].compile_time_value;
Expand Down
4 changes: 2 additions & 2 deletions src/core/Hash.pm
Expand Up @@ -114,7 +114,7 @@ my class Hash {
}

my role TypedHash[::TValue] does Associative[TValue] {
method at_key($key is copy, TValue $v? is copy) is rw {
method at_key(::?CLASS:D: $key is copy, TValue $v? is copy) is rw {
$key = $key.Str;
self.exists($key)
?? nqp::findmethod(EnumMap, 'at_key')(self, $key)
Expand All @@ -135,7 +135,7 @@ my class Hash {
}
my role TypedHash[::TValue, ::TKey] does Associative[TValue] {
has $!keys;
method at_key(TKey \key, TValue $v? is copy) is rw {
method at_key(::?CLASS:D: TKey \key, TValue $v? is copy) is rw {
my $key_which = key.WHICH;
self.exists($key_which)
?? nqp::findmethod(EnumMap, 'at_key')(self, $key_which)
Expand Down

0 comments on commit 0f88d34

Please sign in to comment.