File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ function lookupSimpleName
359359 input InstNode scope;
360360 output InstNode node;
361361protected
362- InstNode cur_scope = InstNode . classScope( scope) ;
362+ InstNode cur_scope = scope;
363363algorithm
364364 // Look for the name in each enclosing scope, until it's either found or we
365365 // run out of scopes.
@@ -370,13 +370,13 @@ algorithm
370370 else
371371 // TODO: Handle encapsulated scopes.
372372 // If the scope has the same name as we're looking for we can just return it.
373- if name == InstNode . name(cur_scope) then
373+ if name == InstNode . name(cur_scope) and InstNode . isClass(cur_scope) then
374374 node := cur_scope;
375375 return ;
376- else
377- // Otherwise, continue in the enclosing scope.
378- cur_scope := InstNode . parentScope(cur_scope);
379376 end if ;
377+
378+ // Otherwise, continue in the enclosing scope.
379+ cur_scope := InstNode . parentScope(cur_scope);
380380 end try ;
381381 end for ;
382382
You can’t perform that action at this time.
0 commit comments