On Sat, May 10, 2008 at 09:43:38AM +0100, Nicholas Clark wrote:
> On Fri, May 09, 2008 at 06:47:12PM -0500, Patrick R. Michaud wrote:
> > On Thu, May 08, 2008 at 11:28:36AM -0700, Moritz Lenz wrote:
> > > > my @a, @b; say @a
> > > Scope  not found for PAST::Var '@b'
> > 
> > Rakudo has this one correct -- according to S03, scoping
> > multiple variables with 'my' requires the parens:
> > 
> > :    my $a;                  # okay
> > :    my ($b, $c);            # okay
> > :    my ($b = 1, $c = 2);    # okay - "my" intializers assign at runtime
> > :    my $b, $c;              # wrong: "Use of undeclared variable: $c"
> 
> But is that really the error message you want to be giving for that syntax
> error? The double spaces suggest that something internal isn't even
> interpolating as expected, due to a the string form of a name being missing.

You're correct, the error message itself needs updating.  At the moment
the error is being caught during code generation (in PCT), whereas
ideally we'd like to catch it during the parse (in the action
method).  At that point we can give a better error message.

Pm

Reply via email to