blob: cc516c550a246c60bd98b6be1203a1044885b2bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// error-pattern:fail
fn main() {
let cheese = "roquefort";
let carrots = @"crunchy";
fn@(tasties: @str, macerate: fn(str)) {
macerate(*tasties);
} (carrots, |food| {
let mush = food + cheese;
let f = fn@() {
let chew = mush + cheese;
fail "so yummy"
};
f();
});
}
|