fail_missing_name.carbon 812 B

12345678910111213141516171819
  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_name.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name.
  7. // CHECK:STDERR: fn ();
  8. // CHECK:STDERR: ^
  9. fn ();
  10. // CHECK:STDOUT: - filename: fail_missing_name.carbon
  11. // CHECK:STDOUT: parse_tree: [
  12. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  13. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  14. // CHECK:STDOUT: {kind: 'InvalidParse', text: '(', has_error: yes},
  15. // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', has_error: yes, subtree_size: 3},
  16. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  17. // CHECK:STDOUT: ]