fail_simple_rewrite_cycle_1.carbon 815 B

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. // AUTOUPDATE
  6. // RUN: %{not} %{explorer-run}
  7. // RUN: %{not} %{explorer-run-trace}
  8. package ExplorerTest api;
  9. interface TwoTypes {
  10. let T:! type;
  11. let U:! type;
  12. }
  13. // Attempting to fully resolve the replacement for `.T` would never create a
  14. // situation where `.T`'s expansion involves `.T`. Ensure we catch this anyway.
  15. // CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/assoc_const/fail_simple_rewrite_cycle_1.carbon:[[@LINE+1]]: rewrite of (X).(TwoTypes.U) applies within its own resolved expansion of (X).(TwoTypes.U)*
  16. fn F[X:! TwoTypes where .T = .U and .U = .U*]() {}
  17. fn Main() -> i32 {
  18. return 0;
  19. }