Skip to content

Commit 4e0e645

Browse files
author
Alexander Regueiro
committed
Added test for issue.
1 parent e0712c8 commit 4e0e645

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: src/test/ui/associated-type-bounds/issue-61752.rs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// run-pass
2+
3+
#![feature(associated_type_bounds)]
4+
5+
trait Foo {
6+
type Bar;
7+
}
8+
9+
impl Foo for () {
10+
type Bar = ();
11+
}
12+
13+
fn a<F: Foo>() where F::Bar: Copy {}
14+
15+
fn b<F: Foo>() where <F as Foo>::Bar: Copy {}
16+
17+
// This used to complain about ambiguous associated types.
18+
fn c<F: Foo<Bar: Foo>>() where F::Bar: Copy {}
19+
20+
fn main() {
21+
a::<()>();
22+
b::<()>();
23+
c::<()>();
24+
}

0 commit comments

Comments
 (0)