Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

Quanthashes should be parameterizable #6689

Closed p6rt closed 4 years ago

p6rt commented 5 years ago

Migrated from rt.perl.org#133762 (status was 'open')

Searchable as RT133762$

p6rt commented 5 years ago

From @daxim

› rpm -qi rakudo | rg Version Version : 2018.12

subset Foo of Str where .chars > 0; my SetHash of Foo %f; %f.elems.say;

  SetHash cannot be parameterized

subset Foo of Str where .chars > 0; subset Foo-SetHash of SetHash where $_ ~~ Foo; my Foo-SetHash $f; $f.elems.say;

  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'?

subset Foo of Str where .chars > 0; subset Foo-SetHash of SetHash where $_ ~~ Foo; my $f = Foo-SetHash.new; $f.elems.say;

  You cannot create an instance of this type (Foo-SetHash)

p6rt commented 5 years ago

From @lizmat

Fixed for Set/SetHash with https://github.com/rakudo/rakudo/commit/4bb5c33c72

On 10 Jan 2019, at 18​:22, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 (via RT) \perl6\-bugs\-followup@​perl\.org wrote​:

# New Ticket Created by Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 # Please include the string​: [perl #​133762] # in the subject line of all future correspondence about this issue. # \<URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=133762 >

› rpm -qi rakudo | rg Version Version : 2018.12

subset Foo of Str where .chars > 0; my SetHash of Foo %f; %f.elems.say;

SetHash cannot be parameterized

subset Foo of Str where .chars > 0; subset Foo-SetHash of SetHash where $_ ~~ Foo; my Foo-SetHash $f; $f.elems.say;

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'?

subset Foo of Str where .chars > 0; subset Foo-SetHash of SetHash where $_ ~~ Foo; my $f = Foo-SetHash.new; $f.elems.say;

You cannot create an instance of this type (Foo-SetHash)

p6rt commented 5 years ago

The RT System itself - Status changed from 'new' to 'open'

p6rt commented 5 years ago

From @lizmat

Fixed for Bag/BagHash with https://github.com/rakudo/rakudo/commit/fe38bdba62

Fixed for Mix/MixHash with https://github.com/rakudo/rakudo/commit/bcc8054a4d

On 13 Jan 2019, at 22​:03, Elizabeth Mattijsen via RT \perl6\-bugs\-followup@&#8203;perl\.org wrote​:

Fixed for Set/SetHash with https://github.com/rakudo/rakudo/commit/4bb5c33c72

On 10 Jan 2019, at 18​:22, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 (via RT) \perl6\-bugs\-followup@&#8203;perl\.org wrote​:

# New Ticket Created by Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 # Please include the string​: [perl #​133762] # in the subject line of all future correspondence about this issue. # \<URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=133762 >

› rpm -qi rakudo | rg Version Version : 2018.12

subset Foo of Str where .chars > 0; my SetHash of Foo %f; %f.elems.say;

SetHash cannot be parameterized

subset Foo of Str where .chars > 0; subset Foo-SetHash of SetHash where $_ ~~ Foo; my Foo-SetHash $f; $f.elems.say;

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'?

subset Foo of Str where .chars > 0; subset Foo-SetHash of SetHash where $_ ~~ Foo; my $f = Foo-SetHash.new; $f.elems.say;

You cannot create an instance of this type (Foo-SetHash)

JJ commented 4 years ago

I would say this is fixed? All possible QuantHashes have been fixed.

lizmat commented 4 years ago

Indeed. But I think it may still need tests?

lizmat commented 4 years ago

Tests added with https://github.com/Raku/roast/commit/fa99dd67b2