// error-pattern:Unsatisfied precondition constraint (for example, init(bar
// xfail-stage0
fn main() {
    auto bar;
    fn baz(int x) { }
    bind baz(bar);
}


Change typestate to use visit instead of walk
Change typestate to use visit instead of walk

Typestate was failing to check some code because if it saw an item,
it would quit immediately. This was to avoid checking nested items
in the same context as the lexically enclosing item, but it was
having the wrong effect: not checking the code after the item at all.

Fixed by switching to visit and skipping over items in a proper
nested fashion. Closes #668.
