resolve_rewrites.carbon 992 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. interface ManyTypes {
  8. let T0:! type;
  9. let T1:! type;
  10. let T2:! type;
  11. let T3:! type;
  12. let T4:! type;
  13. let T5:! type;
  14. let T6:! type;
  15. let T7:! type;
  16. let T8:! type;
  17. let T9:! type;
  18. }
  19. fn F[
  20. M:! ManyTypes where
  21. .T0 = .T1 and
  22. .T1 = .T2 and
  23. .T2 = .T3 and
  24. .T3 = .T4 and
  25. .T4 = .T5 and
  26. .T5 = .T6 and
  27. .T6 = .T7 and
  28. .T7 = .T8 and
  29. .T8 = .T9 and
  30. .T9 = i32](m: M) -> i32 {
  31. var v: M.T0 = 1;
  32. return v;
  33. }
  34. class C {
  35. extend impl as ManyTypes where
  36. .T0 = i32 and
  37. .T1 = .T0 and
  38. .T2 = .T1 and
  39. .T3 = .T2 and
  40. .T4 = .T3 and
  41. .T5 = .T4 and
  42. .T6 = .T5 and
  43. .T7 = .T6 and
  44. .T8 = .T7 and
  45. .T9 = .T8 {}
  46. }
  47. fn Main() -> i32 {
  48. var c: C = {};
  49. return F(c);
  50. }
  51. // CHECK:STDOUT: result: 1