rustc::regionck: fix ICE when getting signature of ty_err

Fixes #5062
This commit is contained in:
Philipp Brüschweiler 2013-06-07 20:08:47 +02:00
parent c74f39782f
commit a99ba1180d
1 changed files with 4 additions and 0 deletions

View File

@ -460,6 +460,10 @@ fn constrain_call(rcx: @mut Rcx,
debug!("constrain_call(call_expr=%s, implicitly_ref_args=%?)",
call_expr.repr(tcx), implicitly_ref_args);
let callee_ty = rcx.resolve_node_type(callee_id);
if ty::type_is_error(callee_ty) {
// Bail, as function type is unknown
return;
}
let fn_sig = ty::ty_fn_sig(callee_ty);
// `callee_region` is the scope representing the time in which the