diff --git a/compilerAst/src/prog8/ast/AstToplevel.kt b/compilerAst/src/prog8/ast/AstToplevel.kt index 8121110cc..94d849786 100644 --- a/compilerAst/src/prog8/ast/AstToplevel.kt +++ b/compilerAst/src/prog8/ast/AstToplevel.kt @@ -82,13 +82,8 @@ interface IStatementContainer { // but adding a memoization cache didn't make much of a practical runtime difference... for (stmt in statements) { when(stmt) { -// is INamedStatement -> { -// if(stmt.name==name) return stmt -// } - is VarDecl -> if(stmt.name==name) return stmt - is Label -> if(stmt.name==name) return stmt - is Subroutine -> if(stmt.name==name) return stmt - is Block -> if(stmt.name==name) return stmt + is VarDecl -> if(stmt.name==name || stmt.names.contains(name)) return stmt + is INamedStatement -> if(stmt.name==name) return stmt is AnonymousScope -> { val found = stmt.searchSymbol(name) if(found!=null) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index b6b89d0eb..0c203eb06 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -1,8 +1,6 @@ TODO ==== -fix the symbol lookup error lsb(a) when a is in a multi vardecl. - ...