Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007232 [Squeak] Compiler minor always 11-25-08 21:14 02-06-11 23:48
Reporter elhochme View Status public  
Assigned To nicolas cellier
Priority normal Resolution fixed  
Status closed   Product Version 3.10.2
Summary 0007232: Out of Scope error always displayed when I have a block where a local variable is declared and assigned to but not used.
Description I found the issue due to when I'm developing I'll hit "accept" in the middle before the method is completed.

The issue is I declare a temp variable in a block and assign a value to it, but if I don't use it, then I get an out-of-scope error. If you put the following code on a class in the Class browser, and try to "accept" you'll get out-of-scope

BEFORE ACCEPT:

generateDoc
    | aDir |

    aDir := FileDirectory on:self directory.
    
    aDir directoryNames do:[ :dirName |
        | tmpDir |
            tmpDir := FileDirectory on:(aDir fullNameFor:dirName) ].


AFTER ACCEPT:

generateDoc
    | aDir |

    aDir := FileDirectory on:self directory.
    
    aDir directoryNames do:[ :dirName |
        | tmpDir |
            tmpDir := FileDirectory on:(aDir fullNameFor:dirName) out of scope ->].
Additional Information I'm using Squeak 3.10.2-7179

Discussion on #squeak occurred on November 25, 2008 around 4:00pm EST. BrianRice tried looking into it but mentioned I should file a bug and have someone more familiar with the Compiler look into it.
Attached Files

- Relationships

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

duplicate of 0006831closed nicolas cellier | | [ | unusedVar | ]. Doesn't compile because of "out of scope ->" 
related to 0006704closed  Parser proposes to remove temps it can not remove 

- Notes
(0012808 - 97 - 97 - 97 - 197 - 197 - 197)
KenCausey
11-26-08 00:01

I'm not certain but I believe the change in 0006704 harvested as update 7145 is the likely culprit.
 
(0013863 - 56 - 62 - 62 - 62 - 62 - 62)
nicolas cellier
09-07-10 19:18

Could not reproduce in trunk 4.2
Probably solved in 4.1
 

- Issue History
Date Modified Username Field Change
11-25-08 21:14 elhochme New Issue
11-26-08 00:00 KenCausey Relationship added related to 0006704
11-26-08 00:01 KenCausey Note Added: 0012808
11-26-08 00:04 KenCausey Relationship added duplicate of 0006831
09-07-10 19:18 nicolas cellier Status new => resolved
09-07-10 19:18 nicolas cellier Fixed in Version  => trunk
09-07-10 19:18 nicolas cellier Resolution open => fixed
09-07-10 19:18 nicolas cellier Assigned To  => nicolas cellier
09-07-10 19:18 nicolas cellier Note Added: 0013863
02-06-11 23:48 leves Status resolved => closed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
52 total queries executed.
39 unique queries executed.
Powered by Mantis Bugtracker