Skip to content

Commit

Permalink
Unit test from #57866.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Jan 25, 2019
1 parent 1593ac9 commit 620a03f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/ui/issues/issue-57866.rs
@@ -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() {}

0 comments on commit 620a03f

Please sign in to comment.