Skip to content

Commit 5640bea

Browse files
author
Eric Holk
committed
Teach ret_ty_of_fn_ty to understand native functions. Closes #506.
1 parent 283744b commit 5640bea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7058,6 +7058,7 @@ fn arg_tys_of_fn(&@crate_ctxt ccx, ast::ann ann) -> vec[ty::arg] {
70587058
fn ret_ty_of_fn_ty(&@crate_ctxt ccx, ty::t t) -> ty::t {
70597059
alt (ty::struct(ccx.tcx, t)) {
70607060
case (ty::ty_fn(_, _, ?ret_ty, _, _)) { ret ret_ty; }
7061+
case (ty::ty_native_fn(_, _, ?ret_ty)) { ret ret_ty; }
70617062
case (_) {
70627063
ccx.sess.bug("ret_ty_of_fn_ty() called on non-function type: " +
70637064
ty_to_str(ccx.tcx, t));

0 commit comments

Comments
 (0)