Add a run-fail test for result::get, get rid of a FIXME. Also some random other tests, mostly xfailed.

This commit is contained in:
Tim Chevalier 2012-04-12 20:24:07 -07:00
parent 79e572ebbb
commit ea0063788b
8 changed files with 113 additions and 1 deletions

View file

@ -0,0 +1,23 @@
// xfail-test
type T = { mut f: fn@() };
type S = { f: fn@() };
fn fooS(t: S) {
}
fn fooT(t: T) {
}
fn bar() {
}
fn main() {
let x: fn@() = bar;
fooS({f: x});
fooS({f: bar});
let x: fn@() = bar;
fooT({mut f: x});
fooT({mut f: bar});
}

View file

@ -0,0 +1,11 @@
// xfail-test
fn main() {
let f = 42;
let _g = if f < 5 {
f.honk();
}
else {
12
};
}