Skip Menu |
Report information
Id: 130444
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: alex.jakimenko [at] gmail.com
Cc:
AdminCc:

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



Subject: [REGRESSION] Hash value constraints are no longer working (Hash[Int].new(‘abc’ => 20..50))
Download (untitled) / with headers
text/plain 383b
Code: say Hash[Int].new(‘abc’ => 20..50) Result (2015.12): Type check failed in binding $x; expected Int but got Range in block <unit> at /tmp/CRJOhWZaTS line 1 «exit code = 1» Result (HEAD): {abc => 20..50} It should complain that it got a Range instead of an Int. Bisectable points to https://github.com/rakudo/rakudo/commit/b2e57f697fad1617951561ff928e6d981b323386
Download (untitled) / with headers
text/plain 599b
On Thu, 29 Dec 2016 13:26:17 -0800, alex.jakimenko@gmail.com wrote: Show quoted text
> Code: > say Hash[Int].new(‘abc’ => 20..50) > > > Result (2015.12): > Type check failed in binding $x; expected Int but got Range > in block <unit> at /tmp/CRJOhWZaTS line 1 > «exit code = 1» > > > Result (HEAD): > {abc => 20..50} > > > It should complain that it got a Range instead of an Int. > > Bisectable points to > https://github.com/rakudo/rakudo/commit/b2e57f697fad1617951561ff928e6d981b323386
Fixed with commit https://github.com/rakudo/rakudo/commit/9acbf000418cd716f532008a5a1704cccf684eae testneeded
Download (untitled) / with headers
text/plain 887b
On Mon, 13 May 2019 10:28:25 -0700, jan-olof.hendig@bredband.net wrote: Show quoted text
> On Thu, 29 Dec 2016 13:26:17 -0800, alex.jakimenko@gmail.com wrote:
> > Code: > > say Hash[Int].new(‘abc’ => 20..50) > > > > > > Result (2015.12): > > Type check failed in binding $x; expected Int but got Range > > in block <unit> at /tmp/CRJOhWZaTS line 1 > > «exit code = 1» > > > > > > Result (HEAD): > > {abc => 20..50} > > > > > > It should complain that it got a Range instead of an Int. > > > > Bisectable points to > > https://github.com/rakudo/rakudo/commit/b2e57f697fad1617951561ff928e6d981b323386
> > Fixed with commit > https://github.com/rakudo/rakudo/commit/9acbf000418cd716f532008a5a1704cccf684eae > > testneeded
Turns out that this issue is the same as R#2348 which was fixed we the above commit. Tests were added to roast with https://github.com/perl6/roast/commit/28301d7c5d closing


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