Permalink
Browse files

Make Pair.invert return a Pair, rather than an Enum

(or anything else that inherits from Enum)
  • Loading branch information...
1 parent 4588808 commit d185d5390ccac5a4aa7fb5ce2df56941b8c35013 @lizmat lizmat committed Oct 1, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/Enum.pm
View
@@ -15,7 +15,7 @@ my class Enum does Associative {
}
method invert() {
- Enum.new(key => $.value, value => $.key);
+ self.new(key => $.value, value => $.key);
}
method key(Enum:D:) { $!key }

0 comments on commit d185d53

Please sign in to comment.