Skip to content

Commit

Permalink
[dlr] Emit correct code for convert of nullable types. Fixes mono#19500
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar committed May 5, 2014
1 parent dba4ec7 commit 0137058
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,7 @@ private void CompileConvertToType(Type typeFrom, Type typeTo, bool isChecked) {
_instructions.EmitBranchNull(nullValue);
CompileConvertToType (typeFrom, typeTo, isChecked);
_instructions.EmitWrap (typeTo);
_instructions.EmitBranch (end);
_instructions.MarkLabel(nullValue);
_instructions.EmitDup (); // Keep null on the stack
_instructions.MarkLabel(end);
return;
}

Expand Down

0 comments on commit 0137058

Please sign in to comment.