Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Day(1)" is ambiguous if both "enum Day" and "sub Day" are defined. #2803

Closed
p6rt opened this issue Jun 28, 2012 · 4 comments
Closed

"Day(1)" is ambiguous if both "enum Day" and "sub Day" are defined. #2803

p6rt opened this issue Jun 28, 2012 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jun 28, 2012

Migrated from rt.perl.org#113892 (status was 'resolved')

Searchable as RT113892$

@p6rt
Copy link
Author

p6rt commented Jun 28, 2012

From sirrobert@gmail.com

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.

-Sir

@p6rt
Copy link
Author

p6rt commented Nov 26, 2015

From @jnthn

On Thu Jun 28 14​:04​:34 2012, sirrobert@​gmail.com wrote​:

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.

@p6rt
Copy link
Author

p6rt commented Nov 26, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 26, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Nov 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant