Skip Menu |
Report information
Id: 129005
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)

From: Zefram <zefram [...]>
Date: Sat, 20 Aug 2016 01:22:40 +0100
To: rakudobug [...]
Subject: [BUG] :D constraint doesn't work when named
Download (untitled) / with headers
text/plain 363b
Show quoted text
> constant IntD := Int:D; say IntD.ACCEPTS(Int); say (sub (IntD $a) { $a })(Int)
False (Int) Observe that the Int:D type constraint in this form allows the undefined Int object through to the sub. I think this is a bug. Its .ACCEPTS method works fine in this form, and the constraint works in both places if referred to as "Int:D" rather than "IntD". -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