rust/tests/pass/negative_discriminant.rs
2022-06-01 10:53:38 -04:00

14 lines
186 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 => (),
}
}