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

Less than awesome diagnostic in enum/class name collision #4334

Closed
p6rt opened this issue Jun 20, 2015 · 5 comments
Closed

Less than awesome diagnostic in enum/class name collision #4334

p6rt opened this issue Jun 20, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jun 20, 2015

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

Searchable as RT125441$

@p6rt
Copy link
Author

p6rt commented Jun 20, 2015

From @jonathanstowe

The following example​:

  enum Error ( Metadata => -20); class Metadata { }

gives rise to​:

===SORRY!===
Cannot find method 'is_composed'

Without any mention of in what or a possible reason why. In a larger enum I had to progressively comment bits out until I saw the problem.

Not a biggy though.

@p6rt
Copy link
Author

p6rt commented Jun 20, 2015

From @jnthn

On Sat Jun 20 02​:46​:16 2015, jns+bc@​gellyfish.co.uk wrote​:

The following example​:

enum Error ( Metadata => -20); class Metadata { }

gives rise to​:

===SORRY!===
Cannot find method 'is_composed'

Without any mention of in what or a possible reason why. In a larger
enum I had to progressively comment bits out until I saw the problem.

Not a biggy though.

Now complains much more sensibly​:

$ perl6-m -e "enum Error ( Metadata => -20); class Metadata { }"
===SORRY!=== Error while compiling -e
Redeclaration of symbol Metadata
at -e​:1
------> Error ( Metadata => -20); class Metadata<HERE> { }

Test added in S32-exceptions/misc.t.

@p6rt
Copy link
Author

p6rt commented Jun 20, 2015

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

@p6rt p6rt closed this as completed Jun 20, 2015
@p6rt
Copy link
Author

p6rt commented Jun 20, 2015

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

@p6rt
Copy link
Author

p6rt commented Jun 21, 2015

From @lizmat

Hmmm… I’m getting​:

$ 6 'enum Error ( Metadata => -20); class Metadata { }'
===SORRY!=== Error while compiling -e
Redeclaration of symbol Metadata
at -e​:1
------> Error ( Metadata => -20); class Metadata⏏ { }
  expecting any of​:
  generic role

as expected?

$ perl6 --version
This is perl6 version 2015.06-26-g6481e24 built on MoarVM version 2015.06-16-g46e941c

Liz

On 20 Jun 2015, at 11​:46, Jonathan Stowe (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Jonathan Stowe
# Please include the string​: [perl #​125441]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125441 >

The following example​:

enum Error ( Metadata => -20); class Metadata { }

gives rise to​:

===SORRY!===
Cannot find method 'is_composed'

Without any mention of in what or a possible reason why. In a larger enum I had to progressively comment bits out until I saw the problem.

Not a biggy though.

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