SmartSyntaxPluginTMethod>>nullReturnExpr, possible bug?

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

SmartSyntaxPluginTMethod>>nullReturnExpr, possible bug?

EstebanLM
 
Hi,
I had to change null output for squeak generated plugins (it was
colliding with other libraries needed) and I found this:

SmartSyntaxPluginTMethod>>nullReturnExpr
        ^ TReturnNode new
                setExpression: (TVariableNode new setName: 'null')


this generates correct return lines, but just because "null" is defined
previously. If I change null to, e.g. sqNil, the previous method still
generates "return null" lines.
So I changed the method as follows:

SmartSyntaxPluginTMethod>>nullReturnExpr
        ^ TReturnNode new
                setExpression: (TVariableNode new setName: 'nil')

just replaced "null" for "nil", and everything seems to be working
fine. Is this hack correct?

Cheers,
Esteban


Reply | Threaded
Open this post in threaded view
|

Re: SmartSyntaxPluginTMethod>>nullReturnExpr, possible bug?

David T. Lewis
 
This has been entered on Mantis as issue #7238

        http://bugs.squeak.org/view.php?id=7238

On Fri, Oct 10, 2008 at 08:46:30AM -0300, Esteban Lorenzano wrote:

>
> Hi,
> I had to change null output for squeak generated plugins (it was
> colliding with other libraries needed) and I found this:
>
> SmartSyntaxPluginTMethod>>nullReturnExpr
> ^ TReturnNode new
> setExpression: (TVariableNode new setName: 'null')
>
>
> this generates correct return lines, but just because "null" is defined
> previously. If I change null to, e.g. sqNil, the previous method still
> generates "return null" lines.
> So I changed the method as follows:
>
> SmartSyntaxPluginTMethod>>nullReturnExpr
> ^ TReturnNode new
> setExpression: (TVariableNode new setName: 'nil')
>
> just replaced "null" for "nil", and everything seems to be working
> fine. Is this hack correct?
>
> Cheers,
> Esteban
>