fail_modifiers.carbon 1.3 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. virtual class B
  7. // CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:1: ERROR: `virtual` declarations must either end with a `;` or have a `{ ... }` block for a definition.
  8. // CHECK:STDERR: impl class
  9. // CHECK:STDERR: ^~~~
  10. // CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:6: ERROR: `class` introducer should be followed by a name.
  11. // CHECK:STDERR: impl class
  12. // CHECK:STDERR: ^~~~~
  13. impl class
  14. // CHECK:STDOUT: - filename: fail_modifiers.carbon
  15. // CHECK:STDOUT: parse_tree: [
  16. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  17. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  18. // CHECK:STDOUT: {kind: 'VirtualModifier', text: 'virtual'},
  19. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'B'},
  20. // CHECK:STDOUT: {kind: 'ClassDecl', text: 'impl', has_error: yes, subtree_size: 4},
  21. // CHECK:STDOUT: {kind: 'ClassIntroducer', text: 'class'},
  22. // CHECK:STDOUT: {kind: 'InvalidParse', text: '', has_error: yes},
  23. // CHECK:STDOUT: {kind: 'ClassDecl', text: 'class', has_error: yes, subtree_size: 3},
  24. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  25. // CHECK:STDOUT: ]