fail_errors_streamed.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. // ARGS: compile --phase=lex --stream-errors %s
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_errors_streamed.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_errors_streamed.carbon
  12. fn run(String program) {
  13. return True;
  14. // CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE+7]]:10: error: invalid digit 'a' in decimal numeric literal
  15. // CHECK:STDERR: var x = 3a;
  16. // CHECK:STDERR: ^
  17. // CHECK:STDERR:
  18. // CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE-7]]:24: error: opening symbol without a corresponding closing symbol
  19. // CHECK:STDERR: fn run(String program) {
  20. // CHECK:STDERR: ^
  21. var x = 3a;