fail_missing_open_curly.carbon 1.4 KB

12345678910111213141516171819202122232425262728
  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. // CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+4]]:15: ERROR: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition.
  7. // CHECK:STDERR: interface Bar Baz {}
  8. // CHECK:STDERR: ^~~
  9. // CHECK:STDERR:
  10. interface Bar Baz {}
  11. interface Foo
  12. // CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+13]]:21: ERROR: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition.
  13. // CHECK:STDERR: // CHECK:STDOUT: ]
  14. // CHECK:STDERR: ^
  15. // CHECK:STDOUT: - filename: fail_missing_open_curly.carbon
  16. // CHECK:STDOUT: parse_tree: [
  17. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  18. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  19. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'Bar'},
  20. // CHECK:STDOUT: {kind: 'InterfaceDecl', text: '}', has_error: yes, subtree_size: 3},
  21. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  22. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'Foo'},
  23. // CHECK:STDOUT: {kind: 'InterfaceDecl', text: 'Foo', has_error: yes, subtree_size: 3},
  24. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  25. // CHECK:STDOUT: ]