Navigation Menu

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

Enum members not exported with enumeration itself in Rakudo #3573

Closed
p6rt opened this issue Nov 3, 2014 · 7 comments
Closed

Enum members not exported with enumeration itself in Rakudo #3573

p6rt opened this issue Nov 3, 2014 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Nov 3, 2014

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

Searchable as RT123114$

@p6rt
Copy link
Author

p6rt commented Mar 3, 2012

From @tadzik

# MyModule.pm
module MyModule;

enum Foo is export (
  bar => 7
);

say Foo​::bar;
say bar;

# user.pl
use MyModule;

say Foo​::bar;
eval "say bar"

#
# output
#

bar
bar
bar
===SORRY!===
CHECK FAILED​:
Undefined routine '&bar' called (line 1)

The "bar" symbol, not prefixed with Foo​:: is not available after import

@p6rt
Copy link
Author

p6rt commented Nov 3, 2014

From @masak

<masak> m​: module M { enum A is export <B C> }; import M; say B
<camelia> rakudo-moar 315ec6​: OUTPUT«===SORRY!=== Error while
compiling /tmp/lblTGtdIWsâ�¤Undeclared name​:â�¤ B used [...]
<masak> is this right? I thought exporting A would export B and C, too.
<FROGGS> m​: module M { enum A is export <B C> }; import M; say M​::B
<camelia> rakudo-moar 315ec6​: OUTPUT«Bâ�¤Â»
* masak submits enum export rakudobug

I would expect that if A is exported (as above), B and C would be
exported with it. That seems not to be the case right now.

@p6rt
Copy link
Author

p6rt commented Jan 9, 2015

From @jnthn

On Mon Nov 03 07​:39​:32 2014, masak wrote​:

<masak> m​: module M { enum A is export <B C> }; import M; say B
<camelia> rakudo-moar 315ec6​: OUTPUT«===SORRY!=== Error while
compiling /tmp/lblTGtdIWsâ�¤Undeclared name​:â�¤ B used [...]
<masak> is this right? I thought exporting A would export B and C, too.
<FROGGS> m​: module M { enum A is export <B C> }; import M; say M​::B
<camelia> rakudo-moar 315ec6​: OUTPUT«Bâ�¤Â»
* masak submits enum export rakudobug

I would expect that if A is exported (as above), B and C would be
exported with it. That seems not to be the case right now.

Fixed in Rakudo 47f3252; tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Jan 11, 2015

From @usev6

I added a test to S12-enums/misc.t with commit Raku/roast@c8e2a0c051

Also I merged RT #​111512 into this ticket, since it was about the same problem.

I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 11, 2015

From @usev6

I added a test to S12-enums/misc.t with commit Raku/roast@c8e2a0c051

Also I merged RT #​111512 into this ticket, since it was about the same problem.

I'm closing this ticket now.

@p6rt
Copy link
Author

p6rt commented Jan 11, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant