Yeah, this is not correct, and it was resolved in (2017-11-27)
https://github.com/rakudo/rakudo/commit/d9021cf16e7df051c5e17c33919c9bde44c5e0db

Now you may wonder when the original “Method 'returns' not found” was fixed,
and… that was on Parrot :) So not really bisectable and not even relevant
today.

W4anD0eR96++ wrote a test for it in
https://github.com/perl6/roast/commit/1fbabe9b57576095a96c2e813c534892efc69596

Closing.

On 2015-01-06 13:51:00, barto...@gmx.de wrote:
> This command no longer results in an internal error message. But the
> resulting enum is not what I expected in the first place (but maybe
> it's technically correct):
>
> $ perl6 -e 'enum Color (<red green purple> Z=> 1,2,4); say
> Color.enums'
> "red\t1 green\t2 purple\t4" => 0
>
> I get the same result when I add an extra pair of parens around a list
> of pairs:
>
> $ perl6 -e 'enum Color (red => 1, green => 2, purple => 4); say
> Color.enums'
> "green" => 2, "purple" => 4, "red" => 1
>
> $ perl6 -e 'enum Color ((red => 1, green => 2, purple => 4)); say
> Color.enums'
> "red\t1 green\t2 purple\t4" => 0
>
> But I cannot just remove the parens in the first example since, since
> that seems to execute 'enum Color <red green purple' and zip the
> resulting enum with (1, 2, 4):
>
> $ perl6 -e 'say enum Color <red green purple> Z=> 1,2,4; say
> Color.enums'
> Color => 1
> "green" => 1, "purple" => 2, "red" => 0

Reply via email to