# New Ticket Created by  Brad Gilbert 
# Please include the string:  [perl #123191]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123191 >


    enum Phonetic ( :Alpha<A>, <Beta Charlie> );
    say Phonetic.enums; # "Alpha" => "A", "Beta Charlie" => "B"

I believe I have localized the problem to the line (3297) in 
src/Perl6/Actions.nqp that I have commented out below.
The lines I have replaced it with make it work for the test case above.
( Of course it isn't general enough )
I don't know enough NQP to properly fix it myself.


        if $term_ast.isa(QAST::Op) && $term_ast.name eq '&infix:<,>' {
            for @($term_ast) {
                if istype($_.returns(), $Pair) && $_[1].has_compile_time_value {
                    @values.push($_);
                }
                elsif $_.has_compile_time_value {
                    @values.push($_);
                }
                else {
                    # @values.push($*W.compile_time_evaluate($<term>, $_));
                    @values.push( $_[0][0] ); # <====
                    @values.push( $_[0][1] ); # <====
                }
            }
        }

Reply via email to