diff options
author | mihaylov <mihaylov@epfl.ch> | 2005-03-29 13:16:53 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2005-03-29 13:16:53 +0000 |
commit | 9e2006a60e136481354ee6c3238303606fe284ea (patch) | |
tree | df4355f0d8c7c41e60390300aa4cfa20b720f4da /sources/scalac/backend/msil | |
parent | a95c0558aae283ebc337255413956a8f61cc746b (diff) | |
download | scala-9e2006a60e136481354ee6c3238303606fe284ea.tar.gz scala-9e2006a60e136481354ee6c3238303606fe284ea.tar.bz2 scala-9e2006a60e136481354ee6c3238303606fe284ea.zip |
Don't emit widening casts.
Diffstat (limited to 'sources/scalac/backend/msil')
-rw-r--r-- | sources/scalac/backend/msil/GenMSIL.java | 3 |
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()) |