fail_missing_open_curly.carbon 1.4 KB

123456789101112131415161718192021222324252627
  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+3]]: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. interface Bar Baz {}
  10. interface Foo
  11. // 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.
  12. // CHECK:STDERR: // CHECK:STDOUT: ]
  13. // CHECK:STDERR: ^
  14. // CHECK:STDOUT: - filename: fail_missing_open_curly.carbon
  15. // CHECK:STDOUT: parse_tree: [
  16. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  17. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  18. // CHECK:STDOUT: {kind: 'Name', text: 'Bar'},
  19. // CHECK:STDOUT: {kind: 'InterfaceDecl', text: 'interface', has_error: yes, subtree_size: 3},
  20. // CHECK:STDOUT: {kind: 'InterfaceIntroducer', text: 'interface'},
  21. // CHECK:STDOUT: {kind: 'Name', text: 'Foo'},
  22. // CHECK:STDOUT: {kind: 'InterfaceDecl', text: 'interface', has_error: yes, subtree_size: 3},
  23. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  24. // CHECK:STDOUT: ]