summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-37808.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/issue-37808.rs')
-rw-r--r--src/test/ui/associated-types/issue-37808.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/issue-37808.rs b/src/test/ui/associated-types/issue-37808.rs
new file mode 100644
index 000000000..3701c37d0
--- /dev/null
+++ b/src/test/ui/associated-types/issue-37808.rs
@@ -0,0 +1,19 @@
+// check-pass
+
+trait Parent {
+ type Ty;
+ type Assoc: Child<Self::Ty>;
+}
+
+trait Child<T> {}
+
+struct ChildWrapper<T>(T);
+impl<A, T> Child<A> for ChildWrapper<T> where T: Child<A> {}
+
+struct ParentWrapper<T>(T);
+impl<A, T: Parent<Ty = A>> Parent for ParentWrapper<T> {
+ type Ty = A;
+ type Assoc = ChildWrapper<T::Assoc>;
+}
+
+fn main() {}