# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #115052] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115052 >
<moritz> r: enum A (b => 42, <c d e>); say A.enums.perl <p6eval> rakudo 16f22b: OUTPUT«===SORRY!===Method 'returns' not found for invocant of class 'Parcel'» <moritz> rakudobug <masak> looks like something that oughta work. <sorear> masak: and it clearly should not fail like that * masak submits <sorear> masak: I think it's trying to treat a parcel as QAST node <moritz> I think I know how to fix it, though jnthn might not like the fix. sorear will though :-) <masak> moritz: you have too much knowledge of the internals of our implementors :P * sorear is curious :-) <sorear> theoretically you should be able to do enum A < :b<42> c d e > <moritz> masak: the fix is to call $*W.compile_time_evaluate on the expression, instead of trying to obtain the return values from the AST <moritz> instead of doing some kind of half-baked constant folding, as we do now <masak> moritz: sounds sane to me. <moritz> but last time I did that for some values, jnthn didn't like the approach <moritz> whereas sorear uses it in niecza for a variety of cases already <moritz> so, that's what my quasi-cryptic statement was about :-) <masak> all noted in the rakudobug ;)