Re: [perl #133762] Quanthashes should be parameterizable

[email protected] (Elizabeth Mattijsen) Sun, 13 Jan 2019 22:03:18 +0100
Newsgroups perl.perl6.compiler
Message-ID <[email protected]>
Fixed for Set/SetHash with =
https://github.com/rakudo/rakudo/commit/4bb5c33c72

> On 10 Jan 2019, at 18:22, Lars D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F=
=E1=B4=A1 =E8=BF=AA=E6=8B=89=E6=96=AF (via RT) =
<[email protected]> wrote:
>=20
> # New Ticket Created by  Lars D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F=
=E1=B4=A1 =E8=BF=AA=E6=8B=89=E6=96=AF=20
> # Please include the string:  [perl #133762]
> # in the subject line of all future correspondence about this issue.=20=

> # <URL: https://rt.perl.org/Ticket/Display.html?id=3D133762 >
>=20
>=20
> =E2=80=BA rpm -qi rakudo | rg Version
> Version     : 2018.12
>=20
> subset Foo of Str where .chars > 0;
> my SetHash of Foo %f;
> %f.elems.say;
>=20
>    SetHash cannot be parameterized
>=20
> subset Foo of Str where .chars > 0;
> subset Foo-SetHash of SetHash where $_ ~~ Foo;
> my Foo-SetHash $f;
> $f.elems.say;
>=20
>    Invocant of method 'elems' must be an object instance of type =
'Setty', not a type object of type 'Foo-SetHash'.  Did you forget a =
'.new'?
>=20
> subset Foo of Str where .chars > 0;
> subset Foo-SetHash of SetHash where $_ ~~ Foo;
> my $f =3D Foo-SetHash.new;
> $f.elems.say;
>=20
>    You cannot create an instance of this type (Foo-SetHash)