Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Create proper .VAR.of methods for Array/Hash, makes 4 TODO tests pass
  • Loading branch information
lizmat committed Aug 19, 2013
1 parent 2857585 commit bc39ad2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Array.pm
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/core/Hash.pm
Expand Up @@ -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;
Expand Down

0 comments on commit bc39ad2

Please sign in to comment.