fail_introducer.carbon 1.2 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. // TODO: Improve the diagnostic to say that the `abstract` modifier can't be
  7. // used on an `interface`.
  8. // CHECK:STDERR: fail_introducer.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
  9. // CHECK:STDERR: abstract interface I;
  10. // CHECK:STDERR: ^~~~~~~~
  11. abstract interface I;
  12. // CHECK:STDERR: fail_introducer.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
  13. // CHECK:STDERR: base fn F();
  14. // CHECK:STDERR: ^~~~
  15. base fn F();
  16. // CHECK:STDERR: fail_introducer.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer.
  17. // CHECK:STDERR: abstract base class C;
  18. // CHECK:STDERR: ^~~~~~~~
  19. abstract base class C;
  20. // CHECK:STDOUT: - filename: fail_introducer.carbon
  21. // CHECK:STDOUT: parse_tree: [
  22. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  23. // CHECK:STDOUT: {kind: 'EmptyDecl', text: ';', has_error: yes},
  24. // CHECK:STDOUT: {kind: 'EmptyDecl', text: ';', has_error: yes},
  25. // CHECK:STDOUT: {kind: 'EmptyDecl', text: ';', has_error: yes},
  26. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  27. // CHECK:STDOUT: ]