Skip to content

Commit

Permalink
Give NQPList a .new method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 18, 2010
1 parent 98e707b commit 7e36dac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions common/NQP/NQPSetting.pm
Expand Up @@ -66,6 +66,9 @@ knowhow NQPNum is repr('P6num') {
}

knowhow NQPList is repr('P6list') {
method new() {
nqp::instance_of(self.WHAT)
}
method elems() {
nqp::lllist_elems(self)
}
Expand All @@ -75,6 +78,15 @@ knowhow NQPList is repr('P6list') {
}

knowhow NQPArray is repr('P6list') {
method new() {
nqp::instance_of(self.WHAT)
}
method elems() {
nqp::lllist_elems(self)
}
method at_pos($idx) {
nqp::lllist_get_at_pos(self, $idx.Int)
}
}

# This is a little bit of a cheat. We only really need to keep
Expand Down

0 comments on commit 7e36dac

Please sign in to comment.