Skip to content
Browse files

Allow slice with :exists adverb on hashes

For some reason a "die" was here, whereas the spec says it should return a
Parcel of Bool.
  • Loading branch information...
1 parent 8c30c2e commit 267c54c11e273d7d0843640e7a86bdaacdc465ce @lizmat lizmat committed with masak May 19, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/Any.pm
View
2 src/core/Any.pm
@@ -364,7 +364,7 @@ my class Any {
\SELF: Positional \key, :$exists!) is rw {
nqp::iscont(key)
?? !( SELF.exists(key) ?^ $exists )
- !! die("Cannot use exists adverb with a slice")
+ !! key.map({ !( SELF.exists($_) ?^ $exists ) }).eager.Parcel;
}
multi method postcircumfix:<{ }>(\SELF: Positional \key, :$p!) is rw {
nqp::iscont(key)

0 comments on commit 267c54c

Please sign in to comment.
Something went wrong with that request. Please try again.