Browse Source

Fixes VariableNode >> isImmutable

Nicolas Petton 11 years ago
parent
commit
4dd0cc15ff
2 changed files with 6 additions and 4 deletions
  1. 5 3
      js/Compiler-AST.js
  2. 1 1
      st/Compiler-AST.st

+ 5 - 3
js/Compiler-AST.js

@@ -2202,11 +2202,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-return false;
+var $1;
+$1=_st(self._binding())._isPseudoVar();
+return $1;
 }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.VariableNode)})},
 args: [],
-source: "isImmutable\x0a\x09^false",
-messageSends: [],
+source: "isImmutable\x0a\x09^ self binding isPseudoVar",
+messageSends: ["isPseudoVar", "binding"],
 referencedClasses: []
 }),
 smalltalk.VariableNode);

+ 1 - 1
st/Compiler-AST.st

@@ -676,7 +676,7 @@ binding: aScopeVar
 !VariableNode methodsFor: 'testing'!
 
 isImmutable
-	^false
+	^ self binding isPseudoVar
 ! !
 
 !VariableNode methodsFor: 'visiting'!