Skip to content

Commit

Permalink
[interp] add missing enum check on constrained callvirt
Browse files Browse the repository at this point in the history
This detail got lost when the code was duplicated here: https://github.com/mono/mono/pull/13154/files#diff-f115ce23fba6528256a47e2b7e8b0a19R1611

Fixes `mono/tests/dim-constrainedcall.il` on the interpreter. This PR will enable it: mono/mono#14166


Commit migrated from mono/mono@539e3f8
  • Loading branch information
lewurm committed May 21, 2019
1 parent cc574f3 commit 33bdf1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target
* but that type doesn't override the method we're
* calling, so we need to box `this'.
*/
if ((td->sp - csignature->param_count - 1)->type == STACK_TYPE_MP) {
if (target_method->klass == mono_defaults.enum_class && (td->sp - csignature->param_count - 1)->type == STACK_TYPE_MP) {
/* managed pointer on the stack, we need to deref that puppy */
/* Always load the entire stackval, to handle also the case where the enum has long storage */
interp_add_ins (td, MINT_LDIND_I8);
Expand Down

0 comments on commit 33bdf1a

Please sign in to comment.