2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2011-06-14 15:58:10 -05:00
|
|
|
// error-pattern:explicit failure
|
2011-05-26 22:14:00 -05:00
|
|
|
use std;
|
|
|
|
import std::option::*;
|
|
|
|
|
2011-07-27 07:19:39 -05:00
|
|
|
fn foo(s: str) { }
|
2011-05-26 22:14:00 -05:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-13 02:10:18 -05:00
|
|
|
let i = alt some::<int>(3) {
|
|
|
|
none::<int>. { fail }
|
|
|
|
some::<int>(_) { fail }
|
|
|
|
};
|
2011-06-15 13:19:50 -05:00
|
|
|
foo(i);
|
2011-08-13 02:10:18 -05:00
|
|
|
}
|