develooper Front page | perl.perl6.compiler | Postings from May 2012

[perl #112956] [BUG] Misleading error message when trying to augment enums in Rakudo

From:
Carl Mäsak
Date:
May 15, 2012 14:24
Subject:
[perl #112956] [BUG] Misleading error message when trying to augment enums in Rakudo
Message ID:
rt-3.6.HEAD-4610-1337117037-441.112956-82-0@perl.org
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #112956]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112956 >


<masak> r: use MONKEY_TYPING; enum Weekday <Mon Tue Wed Thu Fri Sat
Sun>; augment class Weekday { multi method succ($  where Sun:) { Mon }
}; say "alive"
<p6eval> rakudo f69e58: OUTPUT«===SORRY!===␤Cannot auto-generate a
proto method in the setting␤»
<masak> why am I getting this error message?
<jnthn> masak: Because it failed to detect the meta-object mismatch at
the point you started augmenting.
<jnthn> masak: And then EnumHOW ain't set up to support multi-methods
being added.
<masak> where does the setting enter into the picture?
<jnthn> masak: The code path that issues that is the one that you hit
if you don't explicitly write a proto when declaring a multi in the
setting.
<masak> so it tries to figure out what went wrong, and arrives at a
common cause which isn't applicable in this case?
<jnthn> Right.
* masak submits LTA rakudobug
<jnthn> Well, what's really LTA is it let you get that far.
<masak> aye.
<jnthn> Which I do want to fix. So yes, please file.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About