Skip Menu |
Report information
Id: 131948
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: smls75 [at]

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

From: Sam S <smls75 [...]>
Subject: Typename declared via type capture does not work in return type constraint
To: Rakudo Bugtracker <rakudobug [...]>
Date: Tue, 22 Aug 2017 22:36:40 +0200
Download (untitled) / with headers
text/plain 533b
➜ sub f (::T --> T) { } ➜ f Int; Died with X::TypeCheck::Return in sub f at [...] The type alias T works just fine in the rest of the subroutine signature and body; just not inside the return type constraint, and also not in the return type constraint of any nested subroutine: ➜ sub f (::T) { sub g (--> T) { } } ➜ say f(Int)(); Died with X::TypeCheck::Return in sub g at [...] The alternative `returns T` and `of T` syntaxes suffer from the same problem.

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