rust/src/test/codegen/small-dense-int-switch.rs
2013-07-16 17:44:57 -07:00

9 lines
136 B
Rust

#[no_mangle]
fn test(x: int, y: int) -> int {
match x {
1 => y,
2 => y*2,
4 => y*3,
_ => 11
}
}