18 lines
204 B
Plaintext
18 lines
204 B
Plaintext
// ERROR:14:catch
|
|
unit badcatch;
|
|
|
|
error E {
|
|
Bad = 1,
|
|
}
|
|
|
|
fn leaf() -> E!i32 {
|
|
return E.Bad;
|
|
}
|
|
|
|
fn bad() -> i32 {
|
|
let v = leaf() catch |e| {
|
|
let ignored: i32 = 1;
|
|
};
|
|
return v;
|
|
}
|