Skip Menu |
Report information
Id: 130973
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: zefram [at]

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

Subject: [BUG] List.Set loses List elements
From: Zefram <zefram [...]>
To: rakudobug [...]
Date: Fri, 10 Mar 2017 11:26:34 +0000
Download (untitled) / with headers
text/plain 481b
Coercion from List to Set mostly works as expected, returning a Set containing the objects that were elements of the List: Show quoted text
> (2,3,5).perl
(2, 3, 5) Show quoted text
> (2,3,5).Set.perl
set(5,3,2) but it loses when one of the elements is itself a List: Show quoted text
> (2,(3,5)).perl
(2, (3, 5)) Show quoted text
> (2,(3,5)).Set.perl
set(5,3,2) I'd expect that coercion to yield a two-element Set in which one of the elements is a List. Instead it's yielded a three-element Set in which all of the elements are Ints. -zefram

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

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