Skip to content

Commit 620a03f

Browse files
committed
Unit test from #57866.
1 parent 1593ac9 commit 620a03f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/test/ui/issues/issue-57866.rs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// compile-pass
2+
3+
#![feature(type_alias_enum_variants)]
4+
5+
enum Outer<T> {
6+
A(T)
7+
}
8+
9+
enum Inner {
10+
A(i32)
11+
}
12+
13+
type OuterAlias = Outer<Inner>;
14+
15+
fn ice(x: OuterAlias) {
16+
// Fine
17+
match x {
18+
OuterAlias::A(Inner::A(_)) => (),
19+
}
20+
// Not fine
21+
match x {
22+
OuterAlias::A(Inner::A(y)) => (),
23+
}
24+
}
25+
26+
fn main() {}

0 commit comments

Comments
 (0)