Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix take over-flattening
circumfix:<[ ]> needs to be made eager as well.  This
seems to match the wording of the spec (it's an Array,
not a List) and doesn't introduce any regressions in
roast.

Fixes RT#101316 and RT#106986
  • Loading branch information
KrisShannon committed Dec 31, 2011
1 parent 2b6f86b commit b70b105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/Array.pm
Expand Up @@ -81,4 +81,4 @@ class Array {
}


sub circumfix:<[ ]>(*@elems) is rw { my $x = @elems }
sub circumfix:<[ ]>(*@elems) is rw { my $x = @elems.eager }
4 changes: 1 addition & 3 deletions src/core/control.pm
Expand Up @@ -56,9 +56,7 @@ my &take-rw := -> |$ {
my &take := -> |$ {
my $parcel :=
&RETURN-PARCEL(nqp::p6parcel(pir::perl6_current_args_rpa__PP(), Nil));
# XXX Should be nqp::p6recont_ro, but it's currently masking a bug
# where [...] doesn't decontainerize enough.
THROW(nqp::p6decont($parcel),
THROW(nqp::p6recont_ro($parcel),
pir::const::CONTROL_TAKE)
};

Expand Down

0 comments on commit b70b105

Please sign in to comment.