diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-08-06 15:02:33 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-08-06 15:02:33 +0000 |
commit | 17ddb5c33ca64043c784f1bad7fbd7042018664f (patch) | |
tree | f818aad84f6ec561444e15d8b3cb255511114f1e /src | |
parent | 53f715896d18988615e30f643cbea9024e74e4e8 (diff) | |
download | scala-17ddb5c33ca64043c784f1bad7fbd7042018664f.tar.gz scala-17ddb5c33ca64043c784f1bad7fbd7042018664f.tar.bz2 scala-17ddb5c33ca64043c784f1bad7fbd7042018664f.zip |
Added new assertion to prevent invalid conversi...
Added new assertion to prevent invalid conversion from reaching the jvm
backend.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index 6a21b00f86..79714c9bc7 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -1041,6 +1041,7 @@ abstract class GenICode extends SubComponent { case _ => assert(from != UNIT, "Can't convert from UNIT to " + to + tree + " at: " + (tree.pos)); + assert(!from.isReferenceType && !to.isReferenceType, "type error: can't convert from " + from + " to " + to) ctx.bb.emit(CALL_PRIMITIVE(Conversion(from, to)), tree.pos); } } else if (from == SCALA_ALL) { |