Skip to content

Commit

Permalink
Allow Nil as value in initialization of object hash
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 8, 2018
1 parent 605bcb3 commit 7e86d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Hash.pm6
Expand Up @@ -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::bindkey(
nqp::getattr(self,Map,'$!storage'), nqp::getattr(self,Map,'$!storage'),
nqp::unbox_s(key.WHICH), nqp::unbox_s(key.WHICH),
Pair.new( Pair.new(
key, key,
nqp::p6scalarfromdesc(nqp::getattr(self,Hash,'$!descriptor')) nqp::p6scalarfromdesc(nqp::getattr(self,Hash,'$!descriptor'))
= x = value
) )
) )
} }
Expand Down

0 comments on commit 7e86d4e

Please sign in to comment.