[Vm-dev] SmartSyntaxPluginTMethod>>nullReturnExpr, possible bug?

Esteban Lorenzano estebanlm at gmail.com
Fri Oct 10 11:46:30 UTC 2008


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




More information about the Vm-dev mailing list