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

Error with bad enums #5818

Open
p6rt opened this issue Nov 23, 2016 · 2 comments
Open

Error with bad enums #5818

p6rt opened this issue Nov 23, 2016 · 2 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Nov 23, 2016

Migrated from rt.perl.org#130158 (status was 'new')

Searchable as RT130158$

@p6rt
Copy link
Author

p6rt commented Nov 23, 2016

From @zoffixznet

From https://irclog.perlgeek.de/perl6/2016-11-23#i_13618534

15​:43 timotimo that's a cool golf
15​:43 m​: enum Foo (bar => class {}.new)
15​:43 camelia rakudo-moar 6bb882​: OUTPUT«5===SORRY!5=== Error while
compiling <tmp>␤Cannot auto-generate a proto method for 'Int' in the
setting␤at <tmp>​:1␤»
15​:43 timotimo m​: enum Foo (bar => class {})
15​:43 camelia rakudo-moar 6bb882​: OUTPUT«5===SORRY!5=== Error while
compiling <tmp>␤Cannot auto-generate a proto method for 'Int' in the
setting␤at <tmp>​:1␤»
15​:44 viki What's cool about it? What is it trying to do?
15​:44 ZzZombo​: "setting" is what we call the core code.
15​:44 Well, part of it.
15​:45 timotimo it's trying to give us a bad error message
15​:45 viki oh
15​:45 m​: try 'enum Foo (bar => class {}.new)'.EVAL; $!.name
15​:45 camelia rakudo-moar 6bb882​: OUTPUT«No such method 'name' for
invocant of type 'X​::Comp​::AdHoc'␤ in block <unit> at <tmp> line 1␤␤»
15​:45 acrussell_ joined #perl6
15​:45 viki s​: X​::Comp​::AdHoc.new, 'message', \()
15​:45 SourceBaby viki, Sauce is at
https://github.com/rakudo/rakudo/blo​b/6bb8823/src/core/Exception.pm#L124

@p6rt
Copy link
Author

p6rt commented Mar 3, 2017

From @FCO

enum Bla (a => sub {})

Throws an error as you can see here​: https://irclog.perlgeek.de/perl6/2017-03-03#i_14199712

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant