mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 12:21:06 +01:00
Decouple associated constants from let (#5973)
Decouples associated constants from being special cased in let handlers. Enforces associated constant grammar restrictions in parsing instead of checking. Closes #5411
This commit is contained in:
@@ -438,7 +438,8 @@ static auto ParsingInDeferredDefinitionScope(Context& context) -> bool {
|
||||
auto& stack = context.state_stack();
|
||||
if (stack.size() < 2 ||
|
||||
(stack.back().kind != StateKind::DeclScopeLoopAsClass &&
|
||||
stack.back().kind != StateKind::DeclScopeLoopAsNonClass)) {
|
||||
stack.back().kind != StateKind::DeclScopeLoopAsInterface &&
|
||||
stack.back().kind != StateKind::DeclScopeLoopAsRegular)) {
|
||||
return false;
|
||||
}
|
||||
auto kind = stack[stack.size() - 2].kind;
|
||||
|
||||
Reference in New Issue
Block a user