Skip to content

Commit

Permalink
Teach ret_ty_of_fn_ty to understand native functions. Closes #506.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Holk committed Jun 20, 2011
1 parent 283744b commit 5640bea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/comp/middle/trans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7058,6 +7058,7 @@ fn arg_tys_of_fn(&@crate_ctxt ccx, ast::ann ann) -> vec[ty::arg] {
fn ret_ty_of_fn_ty(&@crate_ctxt ccx, ty::t t) -> ty::t {
alt (ty::struct(ccx.tcx, t)) {
case (ty::ty_fn(_, _, ?ret_ty, _, _)) { ret ret_ty; }
case (ty::ty_native_fn(_, _, ?ret_ty)) { ret ret_ty; }
case (_) {
ccx.sess.bug("ret_ty_of_fn_ty() called on non-function type: " +
ty_to_str(ccx.tcx, t));
Expand Down

0 comments on commit 5640bea

Please sign in to comment.