fail_rewrite_cycle.carbon 954 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 ManyTypes {
  10. let T0:! type;
  11. let T1:! type;
  12. let T2:! type;
  13. let T3:! type;
  14. let T4:! type;
  15. let T5:! type;
  16. let T6:! type;
  17. let T7:! type;
  18. let T8:! type;
  19. let T9:! type;
  20. }
  21. fn F[
  22. M:! ManyTypes where
  23. .T0 = .T1 and
  24. .T1 = .T2 and
  25. .T2 = .T3 and
  26. .T3 = .T4 and
  27. .T4 = .T5 and
  28. .T5 = .T6 and
  29. .T6 = .T7 and
  30. .T7 = .T8 and
  31. .T8 = .T9 and
  32. // CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/assoc_const/fail_rewrite_cycle.carbon:[[@LINE+1]]: rewrite of (M).(ManyTypes.T4) applies within its own resolved expansion of (M).(ManyTypes.T4)
  33. .T9 = .T0]() {}
  34. fn Main() -> i32 {
  35. return 0;
  36. }