fail_before_lowering.carbon 938 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. // This validates that earlier errors prevent lowering, without crashing.
  6. // AUTOUPDATE
  7. // TIP: To test this file alone, run:
  8. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lower/testdata/basics/fail_before_lowering.carbon
  9. // TIP: To dump output, run:
  10. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/basics/fail_before_lowering.carbon
  11. // CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+7]]:1: ERROR: Unrecognized declaration introducer.
  12. // CHECK:STDERR: a;
  13. // CHECK:STDERR: ^
  14. // CHECK:STDERR:
  15. // CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: ERROR: Semantics TODO: `HandleInvalidParseStart`.
  16. // CHECK:STDERR: a;
  17. // CHECK:STDERR: ^
  18. a;