Skip to content
Permalink
Browse files

Allow Nil as value in initialization of object hash

  • Loading branch information...
lizmat committed Oct 8, 2018
1 parent 605bcb3 commit 7e86d4e30bdde5d437302fee025954fe0f694b02
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/Hash.pm6
@@ -485,14 +485,14 @@ my class Hash { # declared in BOOTSTRAP
)
}

method STORE_AT_KEY(TKey \key, TValue \x --> Nil) {
method STORE_AT_KEY(::?CLASS:D: TKey \key, Mu \value --> Nil) {
nqp::bindkey(
nqp::getattr(self,Map,'$!storage'),
nqp::unbox_s(key.WHICH),
Pair.new(
key,
nqp::p6scalarfromdesc(nqp::getattr(self,Hash,'$!descriptor'))
= x
= value
)
)
}

0 comments on commit 7e86d4e

Please sign in to comment.
You can’t perform that action at this time.