fail_deref_error.carbon 782 B

1234567891011121314151617181920
  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_deref_error.carbon:[[@LINE+3]]:15: ERROR: Name `undeclared` not found.
  7. // CHECK:STDERR: let n: i32 = *undeclared;
  8. // CHECK:STDERR: ^~~~~~~~~~
  9. let n: i32 = *undeclared;
  10. // CHECK:STDOUT: --- fail_deref_error.carbon
  11. // CHECK:STDOUT:
  12. // CHECK:STDOUT: file {
  13. // CHECK:STDOUT: package: <namespace> = namespace package, {}
  14. // CHECK:STDOUT: %undeclared.ref: <error> = name_ref undeclared, <error>
  15. // CHECK:STDOUT: %.loc10: ref <error> = deref <error>
  16. // CHECK:STDOUT: %n: i32 = bind_name n, <error>
  17. // CHECK:STDOUT: }
  18. // CHECK:STDOUT: