summaryrefslogtreecommitdiff
path: root/sources/scalac/backend/msil/GenMSIL.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac/backend/msil/GenMSIL.java')
-rw-r--r--sources/scalac/backend/msil/GenMSIL.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/scalac/backend/msil/GenMSIL.java b/sources/scalac/backend/msil/GenMSIL.java
index b937f94bcb..3b695f5243 100644
--- a/sources/scalac/backend/msil/GenMSIL.java
+++ b/sources/scalac/backend/msil/GenMSIL.java
@@ -1106,7 +1106,8 @@ public final class GenMSIL {
emitConvert(uetype, ptype);
return items.StackItem(ptype);
}
- } else if (!item.type.equals(mrtype) && !(rtype == tc.OBJECT)) {
+ //} else if (!item.type.equals(mrtype) && !(rtype == tc.OBJECT)) {
+ } else if (!item.type.isSubtypeOf(mrtype) && !(rtype == tc.OBJECT)) {
if (rtype.IsValueType()) {
code.Emit(OpCodes.Unbox, rtype);
if (rtype.IsEnum())