Skip to content

Commit

Permalink
Added test for issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Regueiro committed Aug 5, 2019
1 parent e0712c8 commit 4e0e645
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/test/ui/associated-type-bounds/issue-61752.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// run-pass

#![feature(associated_type_bounds)]

trait Foo {
type Bar;
}

impl Foo for () {
type Bar = ();
}

fn a<F: Foo>() where F::Bar: Copy {}

fn b<F: Foo>() where <F as Foo>::Bar: Copy {}

// This used to complain about ambiguous associated types.
fn c<F: Foo<Bar: Foo>>() where F::Bar: Copy {}

fn main() {
a::<()>();
b::<()>();
c::<()>();
}

0 comments on commit 4e0e645

Please sign in to comment.