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 ... is export #1434

Closed
p6rt opened this issue Dec 11, 2009 · 8 comments
Closed

enum ... is export #1434

p6rt opened this issue Dec 11, 2009 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Dec 11, 2009

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

Searchable as RT71196$

@p6rt
Copy link
Author

p6rt commented Dec 11, 2009

From philipp@marek.priv.at

enum's should be exportable, so that they can be used by multiple modules.

  $ perl6 -e 'enum X «A B C»; '

  $ perl6 -e 'enum X is export «A B C»; '
  Confused at line 1, near "is export "
  in Main (file <unknown>, line <unknown>)

Regards,

Phil

--
Versioning your /etc, /home or even your whole installation?
  Try fsvs (fsvs.tigris.org)!

@p6rt
Copy link
Author

p6rt commented Oct 14, 2011

From @coke

No real change (tried it 2 different ways, just to see​:)

15​:32 < [Coke]> nom​: enum X is export <A B C>;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤No applicable
candidates found
  to dispatch to for 'trait_mod​:<is>'. Available
candidates
  are​:␤​:(Mu $type, Any $size, Any $nativesize)␤​:
(Attribute $attr,
  Any $rw)␤​:(Attribute $attr, Any $readonly)␤​:(Routine
$r, Any
  $rw)␤​:(Routine $r, Any $default)␤​:(Parame…
15​:32 < [Coke]> nom​: enum X <A B C> is export;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤Confused at line 1,
near "enum
  X <A "␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 14, 2011

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Fri Oct 14 12​:33​:26 2011, coke wrote​:

No real change (tried it 2 different ways, just to see​:)

15​:32 < [Coke]> nom​: enum X is export <A B C>;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤No applicable
candidates found
to dispatch to for 'trait_mod​:<is>'. Available
candidates
are​:␤​:(Mu $type, Any $size, Any $nativesize)␤​:
(Attribute $attr,
Any $rw)␤​:(Attribute $attr, Any $readonly)␤​:(Routine
$r, Any
$rw)␤​:(Routine $r, Any $default)␤​:(Parame…
15​:32 < [Coke]> nom​: enum X <A B C> is export;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤Confused at line 1,
near "enum
X <A "␤»

new behavior​:

16​:31 <diakopter> r​: enum X is export <A B C>;
16​:31 <p6eval> rakudo 024843​: ( no output )
16​:31 <diakopter> r​: enum X <A B C> is export;
16​:31 <p6eval> rakudo 024843​: OUTPUT«===SORRY!===␤Error while
compiling, type
  X​::Syntax​::Confused␤ at line 2, near "enum X <A "␤»

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @diakopter

On Tue May 29 14​:33​:15 2012, diakopter wrote​:

On Fri Oct 14 12​:33​:26 2011, coke wrote​:

No real change (tried it 2 different ways, just to see​:)

15​:32 < [Coke]> nom​: enum X is export <A B C>;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤No applicable
candidates found
to dispatch to for 'trait_mod​:<is>'. Available
candidates
are​:␤​:(Mu $type, Any $size, Any $nativesize)␤​:
(Attribute $attr,
Any $rw)␤​:(Attribute $attr, Any $readonly)␤​:
(Routine
$r, Any
$rw)␤​:(Routine $r, Any $default)␤​:(Parame…
15​:32 < [Coke]> nom​: enum X <A B C> is export;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤Confused at line 1,
near "enum
X <A "␤»

new behavior​:

16​:31 <diakopter> r​: enum X is export <A B C>;
16​:31 <p6eval> rakudo 024843​: ( no output )
16​:31 <diakopter> r​: enum X <A B C> is export;
16​:31 <p6eval> rakudo 024843​: OUTPUT«===SORRY!===␤Error while
compiling, type
X​::Syntax​::Confused␤ at line 2, near "enum X <A "␤»

doesn't fail now. marking testneeded.

@p6rt
Copy link
Author

p6rt commented Jun 2, 2012

From @diakopter

On Tue May 29 14​:35​:53 2012, diakopter wrote​:

On Tue May 29 14​:33​:15 2012, diakopter wrote​:

On Fri Oct 14 12​:33​:26 2011, coke wrote​:

No real change (tried it 2 different ways, just to see​:)

15​:32 < [Coke]> nom​: enum X is export <A B C>;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤No applicable
candidates found
to dispatch to for 'trait_mod​:<is>'. Available
candidates
are​:␤​:(Mu $type, Any $size, Any $nativesize)␤​:
(Attribute $attr,
Any $rw)␤​:(Attribute $attr, Any $readonly)␤​:
(Routine
$r, Any
$rw)␤​:(Routine $r, Any $default)␤​:(Parame…
15​:32 < [Coke]> nom​: enum X <A B C> is export;
15​:32 <+p6eval> nom ce15be​: OUTPUT«===SORRY!===␤Confused at line
1,
near "enum
X <A "␤»

new behavior​:

16​:31 <diakopter> r​: enum X is export <A B C>;
16​:31 <p6eval> rakudo 024843​: ( no output )
16​:31 <diakopter> r​: enum X <A B C> is export;
16​:31 <p6eval> rakudo 024843​: OUTPUT«===SORRY!===␤Error while
compiling, type
X​::Syntax​::Confused␤ at line 2, near "enum X <A "␤»

doesn't fail now. marking testneeded.

19​:21 <+dalek> roast​: ed30b2e | diakopter++ | S12-enums/thorough.t​:
19​:21 <+dalek> roast​: test for RT #​71196. resolves ticket.
19​:21 <+dalek> roast​: review​:
Raku/roast@ed30b2efbf

@p6rt
Copy link
Author

p6rt commented Jun 2, 2012

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

@p6rt p6rt closed this as completed Jun 2, 2012
@p6rt
Copy link
Author

p6rt commented Jun 6, 2012

From @moritz

enum X is export <...>; now works. enum X <...> is export is a syntax
error, as it should be.

Basic parsing test in S12-enums/thorough.t.

@p6rt p6rt added the testneeded label Jan 5, 2020
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