Make alias analysis properly recognize closures in call position

I figured this'd break a few things, but in fact it causes no problems
whatsoever.
This commit is contained in:
Marijn Haverbeke 2011-09-01 16:38:30 +02:00
parent 6ba4eacddf
commit fb196e6ef1

View file

@ -181,7 +181,7 @@ fn check_call(cx: &ctx, f: &@ast::expr, args: &[@ast::expr], sc: &scope)
}
let f_may_close = alt f.node {
ast::expr_path(_) { def_is_local(cx.tcx.def_map.get(f.id), true) }
_ { false } // FIXME should be true!
_ { true }
};
if f_may_close {
let i = 0u;