diff options
author | Samantha McVey <samantham@posteo.net> | 2017-04-25 14:00:33 -0700 |
---|---|---|
committer | Samantha McVey <samantham@posteo.net> | 2017-04-25 14:00:33 -0700 |
commit | 6dbd522c277fd60180bc1d068b5fe3b9480549ca (patch) | |
tree | ab109a779f476c6b13e8ebf56573b5b3fe0843c7 /lib/Hash | |
parent | 67a34d4225146d2a343ec9e4ff37d50f9c2b43dc (diff) |
Fix tests for passing a type object hash
Diffstat (limited to 'lib/Hash')
-rw-r--r-- | lib/Hash/Merge.pm6 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Hash/Merge.pm6 b/lib/Hash/Merge.pm6 index 60551a3..d864b7f 100644 --- a/lib/Hash/Merge.pm6 +++ b/lib/Hash/Merge.pm6 @@ -15,7 +15,11 @@ augment class Hash #| Use :no-append-array to replace arrays and positionals instead, which will #| also retain the original type and not convert to an Array #| - method merge (%b; Bool:D :$no-append-array = False) + multi method merge (Hash:U: %b, Bool:D :$no-append-array = False) { + warn "Cannot merge an undefined Hash!"; + return %b; + } + multi method merge (Hash:D: %b, Bool:D :$no-append-array = False) { hashmerge self, %b, :$no-append-array; } |