Skip to content

Commit

Permalink
Multi Cast Delegate with Struct types cause CLR_E_WRONG_TYPE exception (
Browse files Browse the repository at this point in the history
#1829)

* Fix

* Add extra test for boxing

* Code style fixes

Automated fixes for code style.

Co-authored-by: nfbot <nanoframework@outlook.com>
  • Loading branch information
AdrianSoundy and nfbot authored Jan 12, 2021
1 parent 729142f commit a9c2955
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CLR/Core/CLR_RT_StackFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,10 @@ HRESULT CLR_RT_StackFrame::FixCall()
}
else if (args->Dereference()->ObjectCls().m_data == res.m_cls.m_data)
{
NANOCLR_CHECK_HRESULT(args->PerformUnboxing(inst));
if (args->Dereference()->IsBoxed())
{
NANOCLR_CHECK_HRESULT(args->PerformUnboxing(inst));
}
}
else
{
Expand Down

0 comments on commit a9c2955

Please sign in to comment.