Skip to content

Commit

Permalink
Add a regression test for #89935
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 18, 2021
1 parent e2453dc commit 101a81b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/ui/typeck/issue-89935.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// check-pass

trait Foo: Baz {}
trait Bar {}
trait Baz: Bar {
fn bar(&self);
}

impl<T: Foo> Bar for T {}
impl<T: Foo> Baz for T {
fn bar(&self) {}
}

fn accept_foo(x: Box<dyn Foo>) {
x.bar();
}

fn main() {}

0 comments on commit 101a81b

Please sign in to comment.