[BUG] amberc: scope variable names

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[BUG] amberc: scope variable names

PabloEstefo
Hi everyone,

I would like to report a bug in amberc.

When compiling Roassal-Core [0] I had this error:
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Importing: Roassal-Core.st
an Importer>>import:
nil>>nil
a ClassCategoryReader>>scanFrom:
nil>>nil
a ClassCategoryReader>>compileMethod:
a Compiler>>install:forClass:category:
a Compiler>>compile:forClass:
a Compiler>>compile:
a Compiler>>compileNode:
an InliningCodeGenerator>>compileNode:
a SemanticAnalyzer>>visit:
a MethodNode>>accept:
a SemanticAnalyzer>>visitMethodNode:
nil>>nil
a SemanticAnalyzer>>validateVariableScope:
a SemanticAnalyzer>>errorShadowingVariable:
Variable shadowing error: elementsToRender is already defined

undefined:20917
throw anError;lk.withContext(function($ctx1) {
                                                      ^
Error:
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

The thing is that elementsToRender is an instance variable of ROView, but also the name of the argument of ROVIew>>bitmapForElements: . So, in that case I think amberc should consider the scope.

I hope it helps.

Cheers,

Pablo

[0] https://dl.dropbox.com/u/1573200/Roassal-Core.st

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [BUG] amberc: scope variable names

PabloEstefo
I actually "fixed" it just changing the name of the method's argument, but I thought that amberc behavior had to be reported.
El 19-03-2013, a las 18:36, Pablo Estefó <[hidden email]> escribió:

Hi everyone,

I would like to report a bug in amberc.

When compiling Roassal-Core [0] I had this error:
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Importing: Roassal-Core.st
an Importer>>import:
nil>>nil
a ClassCategoryReader>>scanFrom:
nil>>nil
a ClassCategoryReader>>compileMethod:
a Compiler>>install:forClass:category:
a Compiler>>compile:forClass:
a Compiler>>compile:
a Compiler>>compileNode:
an InliningCodeGenerator>>compileNode:
a SemanticAnalyzer>>visit:
a MethodNode>>accept:
a SemanticAnalyzer>>visitMethodNode:
nil>>nil
a SemanticAnalyzer>>validateVariableScope:
a SemanticAnalyzer>>errorShadowingVariable:
Variable shadowing error: elementsToRender is already defined

undefined:20917
throw anError;lk.withContext(function($ctx1) {
                                                      ^
Error:
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

The thing is that elementsToRender is an instance variable of ROView, but also the name of the argument of ROVIew>>bitmapForElements: . So, in that case I think amberc should consider the scope.

I hope it helps.

Cheers,

Pablo

[0] https://dl.dropbox.com/u/1573200/Roassal-Core.st

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: [BUG] amberc: scope variable names

Nicolas Petton

On Mar 19, 2013, at 10:55 PM, Pablo Estefó <[hidden email]> wrote:

I actually "fixed" it just changing the name of the method's argument, but I thought that amberc behavior had to be reported.

Actually, the compiler complained because the code you wrote was not valid :)

nico

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.