Unit test from #57866.
This commit is contained in:
parent
1593ac9b9f
commit
620a03f5aa
26
src/test/ui/issues/issue-57866.rs
Normal file
26
src/test/ui/issues/issue-57866.rs
Normal file
@ -0,0 +1,26 @@
|
||||
// compile-pass
|
||||
|
||||
#![feature(type_alias_enum_variants)]
|
||||
|
||||
enum Outer<T> {
|
||||
A(T)
|
||||
}
|
||||
|
||||
enum Inner {
|
||||
A(i32)
|
||||
}
|
||||
|
||||
type OuterAlias = Outer<Inner>;
|
||||
|
||||
fn ice(x: OuterAlias) {
|
||||
// Fine
|
||||
match x {
|
||||
OuterAlias::A(Inner::A(_)) => (),
|
||||
}
|
||||
// Not fine
|
||||
match x {
|
||||
OuterAlias::A(Inner::A(y)) => (),
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user