rust/src/test/codegen/small-dense-int-switch.rs

10 lines
136 B
Rust
Raw Normal View History

2013-07-16 19:42:28 -05:00
#[no_mangle]
fn test(x: int, y: int) -> int {
match x {
1 => y,
2 => y*2,
4 => y*3,
_ => 11
}
}