mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +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:
+5
-6
@@ -40,9 +40,8 @@ fn F() {
|
||||
// CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'I'},
|
||||
// CHECK:STDOUT: {kind: 'InterfaceDefinitionStart', text: '{', subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'},
|
||||
// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'AssociatedConstantIntroducer', text: 'let'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'},
|
||||
// CHECK:STDOUT: {kind: 'TypeTypeLiteral', text: 'type'},
|
||||
// CHECK:STDOUT: {kind: 'WhereOperand', text: 'where', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'Foo'},
|
||||
@@ -50,9 +49,9 @@ fn F() {
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'Bar'},
|
||||
// CHECK:STDOUT: {kind: 'RequirementImpls', text: 'impls', subtree_size: 4},
|
||||
// CHECK:STDOUT: {kind: 'WhereExpr', text: 'where', subtree_size: 7},
|
||||
// CHECK:STDOUT: {kind: 'CompileTimeBindingPattern', text: ':!', subtree_size: 10},
|
||||
// CHECK:STDOUT: {kind: 'LetDecl', text: ';', subtree_size: 12},
|
||||
// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 16},
|
||||
// CHECK:STDOUT: {kind: 'AssociatedConstantNameAndType', text: ':!', subtree_size: 9},
|
||||
// CHECK:STDOUT: {kind: 'AssociatedConstantDecl', text: ';', subtree_size: 11},
|
||||
// CHECK:STDOUT: {kind: 'InterfaceDefinition', text: '}', subtree_size: 15},
|
||||
// CHECK:STDOUT: {kind: 'LetIntroducer', text: 'let'},
|
||||
// CHECK:STDOUT: {kind: 'IdentifierNameNotBeforeParams', text: 'T'},
|
||||
// CHECK:STDOUT: {kind: 'CompileTimeBindingPatternStart', text: ':!', subtree_size: 2},
|
||||
|
||||
Reference in New Issue
Block a user