rust/tests/pass/negative_discriminant.rs
2022-06-20 16:09:45 -07:00

17 lines
195 B
Rust

enum AB {
A = -1,
B = 1,
}
fn main() {
match AB::A {
AB::A => (),
AB::B => panic!(),
}
match AB::B {
AB::A => panic!(),
AB::B => (),
}
}