fail_recursive_use.carbon 483 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 api;
  7. choice C {
  8. X,
  9. // CHECK:STDERR: COMPILATION ERROR: explorer/testdata/choice/fail_recursive_use.carbon:[[@LINE+1]]: 'C' is not usable until after it has been completely declared
  10. Y(if C.X then i32 else i32)
  11. }
  12. fn Main() -> i32 {
  13. return 0;
  14. }