fail_missing_implicit_close.carbon 1.0 KB

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