Factor the scope stack and lexical lookups out of Check::Context. (#3688)

This commit is contained in:
Richard Smith authored and GitHub committed 2024-02-06 00:59:52 +00:00
1 parent 524902b540
commit fdfb1fb5ef
17 files changed
+416 -289

No files matched your search

+2 -2
View File
@@ -34,9 +34,9 @@ auto HandleLetDecl(Context& context, Parse::LetDeclId parse_node) -> bool {
// TODO: For a qualified `let` declaration, this should use the target scope
// of the name introduced in the declaration. See #2590.
CheckAccessModifiersOnDecl(context, Lex::TokenKind::Let,
context.current_scope_id());
context.scope_stack().PeekNameScopeId());
RequireDefaultFinalOnlyInInterfaces(context, Lex::TokenKind::Let,
context.current_scope_id());
context.scope_stack().PeekNameScopeId());
LimitModifiersOnDecl(
context, KeywordModifierSet::Access | KeywordModifierSet::Interface,
Lex::TokenKind::Let);