perl6-compiler
[Top] [All Lists]

Re: [perl #57446] Enums of only one element don't work i rakudo

To: perl6-compiler@perl.org
Subject: Re: [perl #57446] Enums of only one element don't work i rakudo
From: "Patrick R. Michaud" <pmichaud@pobox.com>
Date: Sat, 2 Aug 2008 15:02:05 -0500
Delivered-to: mailing list perl6-all@perl.org
Delivered-to: perl6-all-poster@perl.org
Delivered-to: mailing list perl6-compiler@perl.org
Delivered-to: perl6-compiler@perl.org
In-reply-to: <rt-3.6.HEAD-29762-1217483187-1904.57446-82-0@perl.org>
List-help: <mailto:perl6-all-help@perl.org>
List-id: <perl6-all.perl.org>
List-id: <perl6-compiler.perl.org>
List-post: <mailto:perl6-all@perl.org>
List-subscribe: <mailto:perl6-all-subscribe@perl.org>
List-unsubscribe: <mailto:perl6-all-unsubscribe@perl.org>
Mailing-list: contact perl6-all-help@perl.org; run by ezmlm
References: <RT-Ticket-57446@perl.org> <16d769b70807302246l23e398ek6ac55250f7427025@mail.gmail.com> <rt-3.6.HEAD-29762-1217483187-1904.57446-82-0@perl.org>
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
On Wed, Jul 30, 2008 at 10:46:27PM -0700, Carl Mäsak wrote:
> $ svn info | grep Revi
> Revision: 29902
> 
> $ ./perl6 -e 'enum Weekday<Monday Tuesday>;' # works
> $ ./perl6 -e 'enum Weekday<Monday>;' # doesn't
> get_pmc_keyed() not implemented in class 'Perl6Str'
> [...]
> 
> Likewise,
> 
> $ ./perl6 -e 'enum <A B C>' # works
> $ ./perl6 -e 'enum <A>' # doesn't
> get_pmc_keyed() not implemented in class 'Perl6Str'
> [...]
> 
> It might be that enums of only one element are so degenerate that they
> are disallowed syntactically, but I don't see are reason for that.
> Even in that case, it's the wrong error.

I suspect the problem is that the enum code is expecting
the angles to always return a List.  Instead it should
probably be evaluating what it gets in list context.

Pm


<Prev in Thread] Current Thread [Next in Thread>
  • Re: [perl #57446] Enums of only one element don't work i rakudo, Patrick R. Michaud <=