2011-09-09 18:20:11 -05:00
|
|
|
// error-pattern:fail
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let cheese = "roquefort";
|
|
|
|
let carrots = @"crunchy";
|
|
|
|
|
2012-01-23 16:59:00 -06:00
|
|
|
fn@(tasties: @str, macerate: fn(str)) {
|
2011-09-09 18:20:11 -05:00
|
|
|
macerate(*tasties);
|
2011-09-12 11:36:51 -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
|
|
|
});
|
|
|
|
}
|