Skip to content

Commit 6351bfd

Browse files
committed
Add test for issue-39618
1 parent 19288dd commit 6351bfd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Regression test for #39618, shouldn't crash.
2+
// check-pass
3+
4+
#![feature(specialization)]
5+
6+
trait Foo {
7+
fn foo(&self);
8+
}
9+
10+
trait Bar {
11+
fn bar(&self);
12+
}
13+
14+
impl<T> Bar for T where T: Foo {
15+
fn bar(&self) {}
16+
}
17+
18+
impl<T> Foo for T where T: Bar {
19+
fn foo(&self) {}
20+
}
21+
22+
impl Foo for u64 {}
23+
24+
fn main() {}

0 commit comments

Comments
 (0)