blob: 62ca1adb81773dd0a59259e093e77c5cd0f99d01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
fn altlit(f: int) -> int {
match f {
10 => { debug!("case 10"); return 20; }
11 => { debug!("case 11"); return 22; }
_ => fail ~"the impossible happened"
}
}
fn main() { assert (altlit(10) == 20); assert (altlit(11) == 22); }
|