# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #118999]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=118999 >


When creating a lexical regex with the same name in two different
contexts, Rakudo triggers an error (namely, trying to create a duplicate
method).  The attached source code should demonstrate this better than I
can explain it.
class MyClass {
    method a {
        my regex foo { . }
    }

    method b {
        my regex foo { . }
    }
}

# causes the following error message to occur:
#`(
===SORRY!===
Package 'MyClass' already has a method 'foo' (did you mean to declare a 
multi-method?)
at test.p6:7
------>
)

Reply via email to