Permalink
Browse files

SI-7159 Remove erroneous INT <:< LONG in TypeKinds

TypeKinds said INT <:< LONG. But that's not true on the JVM, you need
a coercion to move up. And GenICode#adapt was checking for just that
special case.

This commit removes the INT <:< LONG rule and then removes the special
case from GenICode#adapt.
  • Loading branch information...
1 parent 04b147e commit 4124a09379fe1784a6069f5af482bdabdb69a569 @JamesIry JamesIry committed Feb 27, 2013
@@ -1051,11 +1051,6 @@ abstract class GenICode extends SubComponent {
case (NothingReference, _) =>
ctx.bb.emit(THROW(ThrowableClass))
ctx.bb.enterIgnoreMode()
- // this special case is needed because of a special case in TypeKinds that
- // says that the int sized primitives are subtypes of LONG
- // even though they aren't according to the JVM
- case (_, LONG) if from.isIntSizedType =>
- coerce(INT, LONG)
case _ if (from <:< to) =>
()
case (_, UNIT) =>
@@ -96,9 +96,6 @@ trait TypeKinds { self: ICodes =>
// to remove it I got verify errors when compiling the library
// under -optimize
case INT => this.isIntSizedType
- // this case is even more suspect than the previous because
- // BOOL, BYTE, CHAR, SHORT, and INT need conversion to get to LONG
- case LONG => this.isIntSizedType || this == LONG
case _ => this eq other
}

0 comments on commit 4124a09

Please sign in to comment.