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

Owner: Nobody
Requestors: lloyd.fourn [at]

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

Date: Sat, 28 May 2016 12:19:28 +0000
To: "rakudobug [...]" <rakudobug [...]>
Subject: [BUG] LTA error: trying to use regex literals in signature
From: Lloyd Fournier <lloyd.fourn [...]>
Download (untitled) / with headers
text/plain 507b
multi regex-dispatch(/fo+/) { }; 
multi regex-dispatch(/ba+/) {}; 

Calling regex-dispatch(Str) will never work with any of these multi signatures:
    (Int $ where { ... }) 
    (Int $ where { ... })

Obviously what I meant was dispatch it to the one matching. correct answer is to do $ where /../. A literal regex could be an alias for that like a literal "foo" is an alias for $ where "foo". Otherwise make it a compile time error saying you can't use a literal regex in a signature.

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