diff --git a/src/coreclr/jit/codegenwasm.cpp b/src/coreclr/jit/codegenwasm.cpp index 0fa2e31a889144..176375f2d9c1a4 100644 --- a/src/coreclr/jit/codegenwasm.cpp +++ b/src/coreclr/jit/codegenwasm.cpp @@ -443,7 +443,7 @@ void CodeGen::genTableBasedSwitch(GenTree* treeNode) // static constexpr uint32_t PackOperAndType(genTreeOps oper, var_types type) { - if (type == TYP_BYREF) + if ((type == TYP_BYREF) || (type == TYP_REF)) { type = TYP_I_IMPL; }