summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-23304-2.rs
blob: 6376fdb654501f8ec3afab76f439e234fd13b925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
#![allow(dead_code)]

enum X { A = 42 as isize }

enum Y { A = X::A as isize }

fn main() {
    let x = X::A;
    let x = x as isize;
    assert_eq!(x, 42);
    assert_eq!(Y::A as isize, 42);
}