Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #118029] Stash.new creates Hash, not a Stash

1 view
Skip to first unread message

Elizabeth Mattijsen

unread,
May 17, 2013, 5:31:10 AM5/17/13
to bugs-bi...@rt.perl.org
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #118029]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=118029 >


11:27:12] <lizmat> rn: my $s=Stash.new; say $s.WHAT
[11:27:15] <+camelia> rakudo 570d1d: OUTPUT«(Hash)␤»
[11:27:15] <+camelia> ..niecza v24-51-g009f999: OUTPUT«(Stash)␤»
[11:27:34] <lizmat> this means I can't use Stash as a parameter constraint :-(
[11:28:20] <lizmat> r: sub S (Stash $s) { say $s }; S(Stash.new) # rakudobug?
[11:28:21] <+camelia> rakudo 570d1d: OUTPUT«Nominal type check failed for parameter '$s'; expected Stash but got Hash instead␤ in sub S at /tmp/ep3aQw5kNa:1␤ in block at /tmp/ep3aQw5kNa:1␤␤»
[11:28:45] <moritz> yes, Stash.new should produces a Stash, not a Hash
[11:29:40] lizmat submist rakudobug

Christian Bartolomaeus via RT

unread,
Oct 15, 2014, 3:15:02 PM10/15/14
to perl6-c...@perl.org
I added tests to S02-types/declare.t and S02-types/stash.t with the following commit: https://github.com/perl6/roast/commit/658c9604e7

Since the latter file is not yet included in Rakudo's t/spectest.data I'll leave the ticket open until that is done.
0 new messages