Add test for issue-39618

This commit is contained in:
Yuki Okushi 2020-02-16 02:53:58 +09:00
parent 19288ddfd6
commit 6351bfd182

View File

@ -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() {}