[svn:parrot] r39632 - trunk/t/compilers/imcc/syn
Will Coleda
will at coleda.com
Thu Jun 18 14:56:05 UTC 2009
On Thu, Jun 18, 2009 at 10:52 AM, Patrick R. Michaud<pmichaud at pobox.com> wrote:
> On Wed, Jun 17, 2009 at 08:44:29PM +0000, NotFound at svn.parrot.org wrote:
>> +TODO: {
>> + local $TODO = 'TT #767';
>> +
>> +pir_error_output_like( <<'END_PIR', <<'END_EXPECTED', 'no multiple .local, TT #767' );
>> +.sub main :main
>> + .local pmc p
>> + .local pmc p
>> +.end
>> +END_PIR
>> +/^error:imcc:syntax error, duplicated IDENTIFIER/
>> +END_EXPECTED
>> +
>> +}
>
>
> I *really* do not want this to be flagged as an error -- it
> can significantly complicate code generation for people using PCT
> with relatively little benefit.
>
> I commented on this in TT #767 as well -- I'm fine with throwing an
> exception if an existing symbol is redeclared with a different type,
> but redeclaring a symbol with the same type should be allowed.
>
> Or, at the very least, provide an option or directive to say
> "it's okay if this symbol is being redeclared".
>
> Pm
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-commits
>
On the other hand, having a .param pmc foo and a .local pmc foo should
be an error.
At one point, having a label and a local of the same name was also a
problem. (Still an RT about that, I think)
--
Will "Coke" Coleda
More information about the parrot-dev
mailing list