Permalink
Browse files

ObjAt needs its own WHICH method, since it is a value type

  • Loading branch information...
1 parent 06bbaa6 commit 8ea0b2b0baadc4949b70f6fd67bbca970814c1ef @moritz moritz committed Dec 15, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/core/ObjAt.pm
View
@@ -1,4 +1,13 @@
my class ObjAt {
+ multi method WHICH(ObjAt:D:) {
+ nqp::box_s(
+ nqp::concat_s(
+ nqp::concat_s(nqp::unbox_s(self.^name), '|'),
+ $!value
+ ),
+ ObjAt
+ );
+ }
multi method Str(ObjAt:D:) {
nqp::p6box_s(nqp::unbox_s(self));
}

0 comments on commit 8ea0b2b

Please sign in to comment.