summary refs log tree commit diff
path: root/src/test/compile-fail/use-uninit-3.rs
blob: b824567133a0020a9fb56f02d6296dc20ae017e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// error-pattern:Unsatisfied precondition

fn foo(x: int) { log(debug, x); }

fn main() {
    let x: int;
    if 1 > 2 {
        #debug("whoops");
    } else {
        x = 10;
    }
    foo(x);
}