Skip Menu |
Report information
Id: 131395
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: thundergnat [at] comcast.net
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Using a cross meta operator on an empty list complains about not supporting elems
Date: Mon, 29 May 2017 13:00:21 -0400
To: rakudobug [...] perl.org
From: thundergnat <thundergnat [...] comcast.net>
Download (untitled) / with headers
text/plain 445b
Using a cross meta operator on an empty list complains "This type (Scalar) does not support elems". say (1,2).elems; say ().elems; say (1,2) X (); yields "2␤0␤This type (Scalar) does not support elems" Seems to work correctly with arrays instead of lists. say [1,2].elems; say [].elems; say [1,2] X []; Linux Mint 17.2 Show quoted text
>perl6 -v >This is Rakudo version 2017.05 built on MoarVM version 2017.05
implementing Perl 6.c.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 747b
https://irclog.perlgeek.de/perl6/2017-05-29#i_14654174 16:54 bisectable6 MasterDuke, bisect log: https://gist.github.com/7d49ce1401bee0ab3127c5d1be2a919e 16:54 MasterDuke, (2017-01-16) https://github.com/rakudo/rakudo/commit/8a3ff7b64b51a66e0e90437bbeb4793534a07026 16:57 Zoffix m: use nqp; nqp::elems(nqp::getattr((), List, '$!reified')) 16:57 camelia rakudo-moar a18c06: OUTPUT: «This type (Scalar) does not support elems␤ in block <unit> at <tmp> line 1␤␤» 17:00 m: use nqp; dd nqp::getattr((), List, '$!reified').^name; dd nqp::getattr([], List, '$!reified').^name 17:00 camelia rakudo-moar a18c06: OUTPUT: «"Mu"␤"IterationBuffer"␤» 17:00 Zoffix Both prolly should be the same? So this bug doesn't occur elsewhere?
Subject: Re: [perl #131395] Using a cross meta operator on an empty list complains about not supporting elems
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: perl6-bugs-followup [...] perl.org
Date: Mon, 29 May 2017 19:33:09 +0200
Download (untitled) / with headers
text/plain 894b
Show quoted text
> On 29 May 2017, at 19:06, Zoffix Znet via RT <perl6-bugs-followup@perl.org> wrote: > > https://irclog.perlgeek.de/perl6/2017-05-29#i_14654174 > > 16:54 bisectable6 MasterDuke, bisect log: https://gist.github.com/7d49ce1401bee0ab3127c5d1be2a919e > 16:54 MasterDuke, (2017-01-16) https://github.com/rakudo/rakudo/commit/8a3ff7b64b51a66e0e90437bbeb4793534a07026 > > 16:57 Zoffix m: use nqp; nqp::elems(nqp::getattr((), List, '$!reified')) > 16:57 camelia rakudo-moar a18c06: OUTPUT: «This type (Scalar) does not support elems␤ in block <unit> at <tmp> line 1␤␤» > > > 17:00 m: use nqp; dd nqp::getattr((), List, '$!reified').^name; dd nqp::getattr([], List, '$!reified').^name > 17:00 camelia rakudo-moar a18c06: OUTPUT: «"Mu"␤"IterationBuffer"␤» > 17:00 Zoffix Both prolly should be the same? So this bug doesn't occur elsewhere?
FWIW, I’m testing a fix. Liz
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 711b
On Mon, 29 May 2017 10:02:27 -0700, thundergnat@comcast.net wrote: Show quoted text
> Using a cross meta operator on an empty list complains "This type > (Scalar) does not support elems". > > say (1,2).elems; say ().elems; say (1,2) X (); > > yields "2␤0␤This type (Scalar) does not support elems" > > Seems to work correctly with arrays instead of lists. > > say [1,2].elems; say [].elems; say [1,2] X []; > > > Linux Mint 17.2 >
> >perl6 -v > >This is Rakudo version 2017.05 built on MoarVM version 2017.05
> implementing Perl 6.c.
Thank you for the report. lizmat++ fixed the issue. Fix: https://github.com/rakudo/rakudo/commit/9494cbd3b9 Test: https://github.com/perl6/roast/commit/0faf3c354f
RT-Send-CC: rakudobug [...] perl.org, liz [...] dijkmat.nl
Download (untitled) / with headers
text/plain 1.3k
On Mon, 29 May 2017 11:36:49 -0700, cpan@zoffix.com wrote: Show quoted text
> On Mon, 29 May 2017 10:02:27 -0700, thundergnat@comcast.net wrote:
> > Using a cross meta operator on an empty list complains "This type > > (Scalar) does not support elems". > > > > say (1,2).elems; say ().elems; say (1,2) X (); > > > > yields "2␤0␤This type (Scalar) does not support elems" > > > > Seems to work correctly with arrays instead of lists. > > > > say [1,2].elems; say [].elems; say [1,2] X []; > > > > > > Linux Mint 17.2 > >
> > >perl6 -v > > >This is Rakudo version 2017.05 built on MoarVM version 2017.05
> > implementing Perl 6.c.
> > > Thank you for the report. lizmat++ fixed the issue. > > Fix: https://github.com/rakudo/rakudo/commit/9494cbd3b9 > Test: https://github.com/perl6/roast/commit/0faf3c354f
Re-opening, because it hasn't been fixed for the Xop case yet: ➜ say () X+ (1, 2); This type (Scalar) does not support elems ➜ say (1,2) X~ (); This type (Scalar) does not support elems ➜ say () X=> (); This type (Scalar) does not support elems Bisectable¹ blames a commit² from January. --- [1] https://gist.github.com/Whateverable/f1b3066f1e2c45df7ab5e0aa7aeee3a7 [2] https://github.com/rakudo/rakudo/commit/a26f51361 --- This is Rakudo version 2017.09-142-ga89add0bf built on MoarVM version 2017.09.1-49-gb3dd812a implementing Perl 6.c.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org