fix the symbol lookup error lsb(a) when a is in a multi vardecl.

This commit is contained in:
Irmen de Jong 2024-04-11 00:51:08 +02:00
parent 5d7ddebcad
commit 4d37581694
2 changed files with 2 additions and 9 deletions

View File

@ -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)

View File

@ -1,8 +1,6 @@
TODO
====
fix the symbol lookup error lsb(a) when a is in a multi vardecl.
...