[Sema] Clean up extension binding a little

- Turn `BindExtensionsForIDEInspectionRequest` into the main extension
binding request.
- Change `ExtendedNominalRequest` such that it's no longer what
extension binding calls into to do the name lookup, instead it calls
directly into `computeExtendedNominal`. `getExtendedNominal` can
then be the entrypoint for `ExtendedNominalRequest` and assumes that
extension binding has already run. This avoids needing to fake the
dependency relationship in the DeclChecker.
This commit is contained in:
Hamish Knight
2025-09-09 23:18:52 +01:00
parent d9d0b2e6a3
commit 17fe3de8c7
11 changed files with 46 additions and 69 deletions

View File

@@ -214,11 +214,7 @@ void Parser::performIDEInspectionSecondPassImpl(
// Bind extensions if needed. This needs to be done here since we may have
// mutated the AST above.
{
auto *M = SF->getParentModule();
BindExtensionsForIDEInspectionRequest req(M);
evaluateOrDefault(Context.evaluator, req, {});
}
bindExtensions(*SF->getParentModule());
DoneParsingCallback->doneParsing(SF);