fail_missing_open_curly.carbon 1.2 KB

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