about summary refs log tree commit diff
path: root/src/test/run-fail/unwind-lambda.rs
blob: 6980cc16bd1561e51e0429f7b44b2c0c95776491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// error-pattern:fail

fn main() {
    let cheese = "roquefort";
    let carrots = @"crunchy";

    fn (tasties: @str, macerate: block(str)) {
        macerate(*tasties);
    } (carrots, { |food|
        let mush = food + cheese;
        lambda() {
            let chew = mush + cheese;
            fail "so yummy"
        } ();
    });
}