Mantis - Squeak
Viewing Issue Advanced Details
6704 Compiler tweak sometimes 10-03-07 08:30 11-25-08 23:17
rr  
 
normal  
closed 3.9  
fixed  
none    
none 3.10  
0006704: Parser proposes to remove temps it can not remove
When accepting a method, if the parser encounters an unused temporary
variable, it offers to remove it.
However half of the time the variable is stored into, and the parser does
not remove it, instead telling that you should first remove the statement
where the variable is stored.

With this fix (basically reordering the test and the user confirmation) only
the variables which are truly unused are removed.

The code of the method is simpler too.
related to 0007232closed nicolas cellier Out of Scope error always displayed when I have a block where a local variable is declared and assigned to but not used. 
 Parser-removeUnusedTemps.st [^] (1,369 bytes) 10-03-07 08:30

Notes
(0011622)
nicolas cellier   
01-03-08 21:57   
3.9 did not behave very well, but this change seems to make it worse see 0006831

OutOfScope in OldCompiler is a mess, see 0003448 and 0006720
(0012525)
MarcusDenker   
08-25-08 12:30   
in pharo 10064
(0012805)
KenCausey   
11-25-08 23:17   
Harvested as update 7145 and released with Squeak 3.10.