From 5640bead584165c061b3dfd2353948cddbcda50e Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Thu, 16 Jun 2011 11:51:03 -0700 Subject: [PATCH] Teach ret_ty_of_fn_ty to understand native functions. Closes #506. --- src/comp/middle/trans.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 5f2db3eb953..657f184e869 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -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));