fail_missing_implicit_close.carbon 1.0 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. // Fix and uncomment this to test error handling.
  7. // CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+7]]:7: ERROR: Opening symbol without a corresponding closing symbol.
  8. // CHECK:STDERR: fn Div[();
  9. // CHECK:STDERR: ^
  10. // CHECK:STDERR:
  11. // CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+3]]:7: ERROR: `fn` requires a `(` for parameters.
  12. // CHECK:STDERR: fn Div[();
  13. // CHECK:STDERR: ^
  14. fn Div[();
  15. // CHECK:STDOUT: - filename: fail_missing_implicit_close.carbon
  16. // CHECK:STDOUT: parse_tree: [
  17. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  18. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  19. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'Div'},
  20. // CHECK:STDOUT: {kind: 'FunctionDecl', text: ';', has_error: yes, subtree_size: 3},
  21. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  22. // CHECK:STDOUT: ]