Skip to content

Commit 39b468e

Browse files
committed
Fix problem with polymorphic return value being instantiated as nil
Closes #1005
1 parent e6d7b0c commit 39b468e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3785,7 +3785,7 @@ fn trans_args(cx: @block_ctxt, outer_cx: @block_ctxt, llenv: ValueRef,
37853785
} else {
37863786
alt dest {
37873787
ignore. {
3788-
if ty::type_is_nil(tcx, full_retty) ||
3788+
if ty::type_is_nil(tcx, retty) ||
37893789
!option::is_none(lliterbody) {
37903790
llvm::LLVMGetUndef(T_ptr(llretty))
37913791
} else { alloca(cx, llretty) }

0 commit comments

Comments
 (0)