K2 IC: refactor and optimize lookup tracking

- encapsulate semantic more into helpers
- allow lazy scopes iteration
- simplify reporting code in tower resolver
- fix some inconsistencies and wrong lookups
- remove redundant lookup recordings
- remove lookup scopes for non-star imports

The commit is a refactoring and doesn't change the behaviour of
neither IC nor CRI. Changes in the lookups are mostly due to the
previous obviously wrong lookups (see changed test data).
This commit is contained in:
Ilya Chernikov
2024-02-27 16:44:39 +01:00
committed by Space Team
parent fe4e0e9c2e
commit a823bfd600
29 changed files with 176 additions and 179 deletions
@@ -132,8 +132,6 @@ class FirSignatureEnhancement(
symbol = FirEnumEntrySymbol(firElement.symbol.callableId)
returnTypeRef = newReturnTypeRef
origin = FirDeclarationOrigin.Enhancement
}.apply {
session.lookupTracker?.recordTypeResolveAsLookup(newReturnTypeRef, this.source, null)
}.symbol
}
is FirField -> {