Browse Source

Fix glitch in lookupContextForLocal:ifNone:.

Herby Vojčík 4 years ago
parent
commit
89aeddb62d
2 changed files with 4 additions and 4 deletions
  1. 3 3
      lang/src/Compiler-Interpreter.js
  2. 1 1
      lang/src/Compiler-Interpreter.st

+ 3 - 3
lang/src/Compiler-Interpreter.js

@@ -1071,11 +1071,11 @@ selector: "lookupContextForLocal:ifNone:",
 protocol: "private",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aBlock"],
-source: "lookupContextForLocal: aString ifNone: aBlock\x0a\x09\x22Lookup the context defining the local named `aString` \x0a\x09up to the method context\x22\x0a\x0a\x09^ self locals \x0a\x09\x09at: aString\x0a\x09\x09ifPresent: [ self ]\x0a\x09\x09ifAbsent: [ \x0a\x09\x09\x09self outerContext \x0a\x09\x09\x09\x09ifNil: aBlock\x0a\x09\x09\x09\x09ifNotNil: [ :context | \x0a\x09\x09\x09\x09\x09context lookupContextForLocal: aString ] ]",
+source: "lookupContextForLocal: aString ifNone: aBlock\x0a\x09\x22Lookup the context defining the local named `aString` \x0a\x09up to the method context\x22\x0a\x0a\x09^ self locals \x0a\x09\x09at: aString\x0a\x09\x09ifPresent: [ self ]\x0a\x09\x09ifAbsent: [ \x0a\x09\x09\x09self outerContext \x0a\x09\x09\x09\x09ifNil: aBlock\x0a\x09\x09\x09\x09ifNotNil: [ :context | \x0a\x09\x09\x09\x09\x09context lookupContextForLocal: aString ifNone: aBlock ] ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["at:ifPresent:ifAbsent:", "locals", "ifNil:ifNotNil:", "outerContext", "lookupContextForLocal:"]
+messageSends: ["at:ifPresent:ifAbsent:", "locals", "ifNil:ifNotNil:", "outerContext", "lookupContextForLocal:ifNone:"]
 }, function ($methodClass){ return function (aString,aBlock){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -1094,7 +1094,7 @@ return $recv($1)._ifNil_ifNotNil_(aBlock,(function(context){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv(context)._lookupContextForLocal_(aString);
+return $recv(context)._lookupContextForLocal_ifNone_(aString,aBlock);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({context:context},$ctx2,3)});
 //>>excludeEnd("ctx");

+ 1 - 1
lang/src/Compiler-Interpreter.st

@@ -372,7 +372,7 @@ lookupContextForLocal: aString ifNone: aBlock
 			self outerContext 
 				ifNil: aBlock
 				ifNotNil: [ :context | 
-					context lookupContextForLocal: aString ] ]
+					context lookupContextForLocal: aString ifNone: aBlock ] ]
 ! !
 
 !AIContext methodsFor: 'testing'!