Skip to content
Browse files

Create proper .VAR.of methods for Array/Hash, makes 4 TODO tests pass

  • Loading branch information...
1 parent 2857585 commit bc39ad2b35b0d13018b2c6be15063d170d0e2912 @lizmat lizmat committed Aug 19, 2013
Showing with 8 additions and 0 deletions.
  1. +4 −0 src/core/Array.pm
  2. +4 −0 src/core/Hash.pm
View
4 src/core/Array.pm
@@ -87,6 +87,10 @@ class Array { # declared in BOOTSTRAP
method flattens() { 1 }
+ method of() {
+ my $d := $!descriptor;
+ nqp::isnull($d) ?? Mu !! $d.of;
+ }
method default() {
my $d := $!descriptor;
nqp::isnull($d) ?? Mu !! $d.default;
View
4 src/core/Hash.pm
@@ -77,6 +77,10 @@ my class Hash { # declared in BOOTSTRAP
self
}
+ method of() {
+ my $d := $!descriptor;
+ nqp::isnull($d) ?? Mu !! $d.of;
+ }
method default() {
my $d := $!descriptor;
nqp::isnull($d) ?? Mu !! $d.default;

0 comments on commit bc39ad2

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