Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix endless recursion in Hash coercer
Fixes hang in Hash((:a)) and (:a).Hash
  • Loading branch information
niner committed Aug 20, 2015
1 parent 1fbbd02 commit 7b80988
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Hash.pm
Expand Up @@ -2,6 +2,10 @@ my class Hash { # declared in BOOTSTRAP
# my class Hash is EnumMap {
# has Mu $!descriptor;

multi method Hash() {
self
}

multi method AT-KEY(Hash:D: \key) is rw {
my Mu $storage := nqp::getattr(self, EnumMap, '$!storage');
$storage := nqp::bindattr(self, EnumMap, '$!storage', nqp::hash())
Expand Down

0 comments on commit 7b80988

Please sign in to comment.