resolve_rewrites.carbon 984 B

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