f0ddb293345e5013757ebfacd7769ef92acd41d4 514 B

1234567891011121314151617
  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. package ExplorerTest;
  7. class C {
  8. // CHECK:STDERR: COMPILATION ERROR: fail_use_before_typecheck.carbon:[[@LINE+1]]: incomplete type `class C` used in member access
  9. var n: if not C.WrapInStruct() then i32 else {.n: i32};
  10. fn WrapInStruct() -> bool { return true; }
  11. }
  12. fn Main() -> i32 {
  13. return 0;
  14. }