mismatched_introducer.carbon 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. // Note: invalid modifiers are diagnosed in check not parse.
  7. abstract interface I;
  8. base fn F();
  9. abstract base class C;
  10. // CHECK:STDOUT: - filename: mismatched_introducer.carbon
  11. // CHECK:STDOUT: parse_tree: [
  12. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  13. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  14. // CHECK:STDOUT: {kind: 'AbstractModifier', text: 'abstract'},
  15. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'I'},
  16. // CHECK:STDOUT: {kind: 'InterfaceDecl', text: ';', subtree_size: 4},
  17. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  18. // CHECK:STDOUT: {kind: 'BaseModifier', text: 'base'},
  19. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'F'},
  20. // CHECK:STDOUT: {kind: 'TuplePatternStart', text: '('},
  21. // CHECK:STDOUT: {kind: 'TuplePattern', text: ')', subtree_size: 2},
  22. // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', subtree_size: 6},
  23. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  24. // CHECK:STDOUT: {kind: 'AbstractModifier', text: 'abstract'},
  25. // CHECK:STDOUT: {kind: 'BaseModifier', text: 'base'},
  26. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'C'},
  27. // CHECK:STDOUT: {kind: 'ClassDecl', text: ';', subtree_size: 5},
  28. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  29. // CHECK:STDOUT: ]