Skip Menu |
Report information
Id: 113892
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: sirrobert [at] gmail.com
Cc:
AdminCc:

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



Subject: "Day(1)" is ambiguous if both "enum Day" and "sub Day" are defined.
Date: Thu, 28 Jun 2012 17:03:39 -0400
To: rakudobug [...] perl.org
From: Sir Robert Burbridge <sirrobert [...] gmail.com>
Download (untitled) / with headers
text/plain 255b
From #perl6:

Show quoted text
16:53 < moritz> r: module A { enum Day is export <Mon Tue>; sub Day is export { 'sub Day' } }; import A; say Day(0);
16:53 <+p6eval> rakudo 39087a: OUTPUT«Mon␤»

In my opinion, priority should go to the sub, for what it's worth.


-Sir
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 489b
On Thu Jun 28 14:04:34 2012, sirrobert@gmail.com wrote: Show quoted text
> From #perl6: > > 16:53 < moritz> r: module A { enum Day is export <Mon Tue>; sub Day is > export { 'sub Day' } }; import A; say Day(0); > 16:53 <+p6eval> rakudo 39087a: OUTPUT«Mon␤» > > > In my opinion, priority should go to the sub, for what it's worth. >
Larry ruled that it should go to the enum, as it already does: http://irclog.perlgeek.de/perl6/2015-11-26#i_11605891 Tests for this added to S02-names-vars/names.t.


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