Skip Menu |
Report information
Id: 123445
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: rob [at] hoelz.ro
Cc:
AdminCc:

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



Subject: More generic arguments should be acceptable for blocks supplied as closure parameters
Download (untitled) / with headers
text/plain 223b
For example: sub doing-stringy-thing(&action:(Str)) { action 'Hello'; } The following fails: doing-stringy-thing(-> $value {}); Even though $value can be any Mu (which all Strs are), the above code doesn't type check.
Still reproducible (2017.11,HEAD(e5b660e)), but I don't think that's the direction the information should flow.

I think this ticket is rejectable.
On 2014-12-16 20:26:58, rob@hoelz.ro wrote:
Show quoted text
> For example:
>
> sub doing-stringy-thing(&action:(Str)) {
> action 'Hello';
> }
>
> The following fails:
>
> doing-stringy-thing(-> $value {});
>
> Even though $value can be any Mu (which all Strs are), the above code
> doesn't type check.




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