2011-09-09 18:20:11 -05:00
|
|
|
// error-pattern:fail
|
|
|
|
|
|
|
|
fn main() {
|
2012-07-14 00:57:48 -05:00
|
|
|
let cheese = ~"roquefort";
|
|
|
|
let carrots = @~"crunchy";
|
2011-09-09 18:20:11 -05:00
|
|
|
|
2012-07-14 00:57:48 -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;
|
2012-07-14 00:57:48 -05:00
|
|
|
fail ~"so yummy"
|
2012-01-10 08:49:15 -06:00
|
|
|
};
|
|
|
|
f();
|
2011-09-09 18:20:11 -05:00
|
|
|
});
|
|
|
|
}
|