Ticket #1144 (closed bug: fixed)
MMD incorrectly matches _ instead of String
Reported by: | Austin_Hastings | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | 1.7.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
In the code below, I believe that calls to foo('bar') should be delivered to the :multi(String) sub, not the :multi(_) sub.
.namespace [] .sub 'foo' :multi(_) .param pmc args :slurpy print "multi(_) : arg is a: " $P0 = shift args $S0 = typeof $P0 say $S0 .end .sub 'foo' :multi(String) .param pmc args :slurpy say "multi(String)" .end .sub 'main' :main foo(1) foo('bar') foo('bar', 'baz') $P0 = box 'bar' foo($P0) foo($P0, 'baz') .end
On my 1.7.0-devel version, the output is:
multi(_) : arg is a: Integer multi(_) : arg is a: String multi(_) : arg is a: String multi(String) multi(String)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.