2011-09-09 18:20:11 -05:00
|
|
|
// error-pattern:fail
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let cheese = "roquefort";
|
|
|
|
let carrots = @"crunchy";
|
|
|
|
|
2012-07-12 01:42:26 -05:00
|
|
|
fn@(tasties: @str/~, macerate: fn(str)) {
|
2011-09-09 18:20:11 -05:00
|
|
|
macerate(*tasties);
|
2012-06-30 18:19:07 -05:00
|
|
|
} (carrots, |food| {
|
2011-09-09 18:20:11 -05:00
|
|
|
let mush = food + cheese;
|
2012-01-10 08:49:15 -06:00
|
|
|
let f = fn@() {
|
2011-09-09 18:20:11 -05:00
|
|
|
let chew = mush + cheese;
|
|
|
|
fail "so yummy"
|
2012-01-10 08:49:15 -06:00
|
|
|
};
|
|
|
|
f();
|
2011-09-09 18:20:11 -05:00
|
|
|
});
|
|
|
|
}
|