On Sat Mar 21 02:42:29 2009, autoe...@xs4all.nl wrote: > Unsure whether the following should work, but it doesn't: > > perl6 -e 'enum E <foo bar>; my E $x=E::bar; given $x { when E::foo {say > "FOO"} when E::bar {say "BAR"}};' > Method 'ACCEPTS' not found for invocant of class '' > > The problem seems to be that the 'when' cannot perform a smart match on an > enum member. > That was the problem, and it's now fixed in e33c004; unfudged some tests for smartmatching on enum values, added a couple to S12-enums/basic.t that explicitly try it out with given/when.
Thanks, Jonathan