Skip to content

Commit

Permalink
Add back die() that went missing with 2ee82af
Browse files Browse the repository at this point in the history
Spotted by AlexDaniel++, fixes R#3617
  • Loading branch information
lizmat committed Apr 12, 2020
1 parent b9105f1 commit 1a10b63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Map.pm6
Expand Up @@ -292,10 +292,10 @@ my class Map does Iterable does Associative { # declared in BOOTSTRAP

multi method ASSIGN-KEY(Map:D: \key, Mu \new) {
nqp::isnull(my \old := nqp::atkey($!storage,key.Str))
?? "Cannot add key '{key}' to an immutable {self.^name}"
?? die("Cannot add key '{key}' to an immutable {self.^name}")
!! nqp::iscont(old)
?? (old = new)
!! "Cannot change key '{key}' in an immutable {self.^name}"
!! die("Cannot change key '{key}' in an immutable {self.^name}")
}

# Directly copy from the other Map's internals.
Expand Down

0 comments on commit 1a10b63

Please sign in to comment.