Skip to content

Commit

Permalink
Add test for issue-39618
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Feb 15, 2020
1 parent 19288dd commit 6351bfd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/test/ui/specialization/issue-39618.rs
@@ -0,0 +1,24 @@
// Regression test for #39618, shouldn't crash.
// check-pass

#![feature(specialization)]

trait Foo {
fn foo(&self);
}

trait Bar {
fn bar(&self);
}

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

impl<T> Foo for T where T: Bar {
fn foo(&self) {}
}

impl Foo for u64 {}

fn main() {}

0 comments on commit 6351bfd

Please sign in to comment.