AnyDSL / thorin

The Higher-Order Intermediate Representation
https://anydsl.github.io
GNU Lesser General Public License v3.0
151 stars 15 forks source link

'May be undefined' message #27

Closed madmann91 closed 8 years ago

madmann91 commented 8 years ago

I got the 'May be undefined' message after compiling the following piece of code:

fn iterate_children(mut node_id: &i32) -> () {
    for call_me() {
        if 42 < *node_id {
            // Nothing to see here
        }
    }
    *node_id = 42;
}

fn call_me(body: fn() -> ()) -> () {
    body();
}

extern fn traverse_accel() -> () {
    let mut node_id = 42;
    while node_id < 42 {
        @iterate_children(&node_id);
    }
}
leissa commented 8 years ago

I will close this issue when I've written a test case which works with our test suite.

leissa commented 8 years ago

just discovered, that the original case still triggers this message... I could have sworn I've tested it...