rnett
07/09/2025, 9:44 PMgetNestedClassifiersNames, and running into problems because FirClassDeclaredMemberScopeImpl attempts to list the nested classifiers on creation, resulting a stack overflow. This is used by FirClassSymbol.constructors and FirSession.declaredMemberScope. Presumably this is to allow inclusion of static/companion object members, which I don't care about here. I've found several options to work around it:
1. Look at the declarations in classSymbol.fir.declarations or classSymbol.declarationSymbols directly - this has all sorts of warning annotations and seems like a bad idea
2. Use session.declaredMemberScopeWithLazyNestedScope(classSymbol.fir, emptyList()) - this uses the FIR scopes, but requires manually accessing .fir. Doesn't seem to result in the generated name showing up unless it's also in the existingNames argument, which defeats the point.
What's the best option here? Is there an option I'm missing?dmitriy.novozhilov
07/10/2025, 6:33 AM.fir is fine if you do it carefully: don't invoke lazy resolve and don't try to get the information which potentially could be unresolved at this point