about summary refs log tree commit diff
path: root/tests/ui/qualified/qualified-path-params-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/qualified/qualified-path-params-2.rs')
-rw-r--r--tests/ui/qualified/qualified-path-params-2.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/qualified/qualified-path-params-2.rs b/tests/ui/qualified/qualified-path-params-2.rs
new file mode 100644
index 00000000000..d0cc1fa3d51
--- /dev/null
+++ b/tests/ui/qualified/qualified-path-params-2.rs
@@ -0,0 +1,21 @@
+// Check that qualified paths with type parameters
+// fail during type checking and not during parsing
+
+struct S;
+
+trait Tr {
+    type A;
+}
+
+impl Tr for S {
+    type A = S;
+}
+
+impl S {
+    fn f<T>() {}
+}
+
+type A = <S as Tr>::A::f<u8>;
+//~^ ERROR ambiguous associated type
+
+fn main() {}