Skip Menu |
Report information
Id: 130158
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
fernandocorrea [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [LTA] Error with bad enums
Date: Wed, 23 Nov 2016 10:57:48 -0500
To: rakudobug [...] perl.org
From: cpan [...] zoffix.com
Download (untitled) / with headers
text/plain 1.1k
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
Date: Fri, 3 Mar 2017 09:36:19 -0300
From: Fernando Oliveira <fernandocorrea [...] gmail.com>
Subject: [BUG] cannot create a enum with a sub as it's value
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 118b

enum Bla (a => sub {})

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



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org