Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove DELETE-KEY Str candidate; let Str() do it.
With the new multi-dispatch semantics around coercion types, this led
to an ambiguous dispatch error.
  • Loading branch information
jnthn committed Apr 4, 2015
1 parent ef3ef50 commit 6e7735d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/core/Hash.pm
Expand Up @@ -90,21 +90,6 @@ my class Hash { # declared in BOOTSTRAP
}

multi method DELETE-KEY(Hash:U:) { Nil }
multi method DELETE-KEY(Str:D \key) {
my Mu $val = self.AT-KEY(key);
nqp::deletekey(
nqp::getattr(self, EnumMap, '$!storage'),
nqp::unbox_s(key)
);
$val;
}
multi method DELETE-KEY(Str:D \key, :$SINK!) {
nqp::deletekey(
nqp::getattr(self, EnumMap, '$!storage'),
nqp::unbox_s(key)
);
Nil;
}
multi method DELETE-KEY(Str() \key) {
my Mu $val = self.AT-KEY(key);
nqp::deletekey(
Expand Down

0 comments on commit 6e7735d

Please sign in to comment.