Closed p6rt closed 12 years ago
Both rakudo's grammar and STD.pm have this line in token methodop:
| ':' \<?before \s> \<!{ $+inquote }> \<EXPR(%list_prefix)>
t/spec/S29-list/minmax.t has the following parse failure in a few places, though:
is @array.min:{ $^a \<=> $^b }, -9,
This doesn't parse because there's no whitespace after the :
Is the test wrong? Should I update the test to match the grammar or the grammar to match the test?
On Tue, May 06, 2008 at 11:35:20PM -0700, Stephen Weeks wrote:
Both rakudo's grammar and STD.pm have this line in token methodop:
| '​:' \<?before \\s> \<\!\{ $\+inquote \}> \<EXPR\(%list\_prefix\)>
t/spec/S29-list/minmax.t has the following parse failure in a few places, though:
is @​array\.min​:\{ $^a \<=> $^b \}, \-9,
This doesn't parse because there's no whitespace after the :
According to TimToady on #perl6, :{ $^a \<=> $^b} is an adverbial block (see S02).
So, I'm guessing the :{...} should be parsed by the
\
token colonpair {
':'
[
| '!' \
We may still need to find out what causes the parsefail in Rakudo, though.
Pm
The RT System itself - Status changed from 'new' to 'open'
- Needs update to grammar, may need to wait for LTM in PGE
$ perl6 -e 'my @array = 1, 2, 3; say @array.min:{ $^a \<=> $^b }' Method 'min:{ $^a \<=> $^b }' not found for invocant of class 'Array' [...]
Seems now Rakudo considers the colon and the block to be part of the method name. Still wrong, but in a more hopeful way, p'haps.
On Sat Mar 20 09:42:27 2010, masak wrote:
$ perl6 -e 'my @array = 1, 2, 3; say @array.min:{ $^a \<=> $^b }' Method 'min:{ $^a \<=> $^b }' not found for invocant of class 'Array' [...]
Seems now Rakudo considers the colon and the block to be part of the method name. Still wrong, but in a more hopeful way, p'haps.
seems fixed now. marking testneeded.
16:55 \
On Tue May 29 14:55:53 2012, diakopter wrote:
On Sat Mar 20 09:42:27 2010, masak wrote:
$ perl6 -e 'my @array = 1, 2, 3; say @array.min:{ $^a \<=> $^b }' Method 'min:{ $^a \<=> $^b }' not found for invocant of class 'Array' [...]
Seems now Rakudo considers the colon and the block to be part of the method name. Still wrong, but in a more hopeful way, p'haps.
seems fixed now. marking testneeded.
16:55 \
r: my @array = 1, 2, 3; say @array.min:{ $^a \<=> $^b } 16:55 \ rakudo 024843: OUTPUT«1»
added a test in ed219b0. Resolving.
@diakopter - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#53804 (status was 'resolved')
Searchable as RT53804$