summary refs log tree commit diff
path: root/tests/ui/consts/const-enum-byref-self.rs
blob: 435d714ad834371530561e674435b31c31c45852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ run-pass
#![allow(dead_code)]

enum E { V, VV(isize) }
static C: E = E::V;

impl E {
    pub fn method(&self) {
        match *self {
            E::V => {}
            E::VV(..) => panic!()
        }
    }
}

pub fn main() {
    C.method()
}