diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2005-11-16 10:20:40 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2005-11-16 10:20:40 +0000 |
commit | ea98167b27447b0325339ee07bf75638dea61138 (patch) | |
tree | e2d30ce7fe3f236b21e4940660f0c3f37b901066 | |
parent | d7d3c75f7092bcce1e6853b2286454d9da21fbe5 (diff) | |
download | scala-ea98167b27447b0325339ee07bf75638dea61138.tar.gz scala-ea98167b27447b0325339ee07bf75638dea61138.tar.bz2 scala-ea98167b27447b0325339ee07bf75638dea61138.zip |
Fixed some erroneus error messages in Checkers ...
Fixed some erroneus error messages in Checkers and removed unnecessary
printfs.
-rw-r--r-- | sources/scala/tools/nsc/backend/icode/BasicBlocks.scala | 3 | ||||
-rw-r--r-- | sources/scala/tools/nsc/backend/icode/Checkers.scala | 3 | ||||
-rw-r--r-- | sources/scala/tools/nsc/backend/icode/TypeKinds.scala | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/sources/scala/tools/nsc/backend/icode/BasicBlocks.scala b/sources/scala/tools/nsc/backend/icode/BasicBlocks.scala index abee64d851..772bd5ef0b 100644 --- a/sources/scala/tools/nsc/backend/icode/BasicBlocks.scala +++ b/sources/scala/tools/nsc/backend/icode/BasicBlocks.scala @@ -195,8 +195,9 @@ trait BasicBlocks: ICodes { case SWITCH(_,labels) => labels; case RETURN(_) => Nil; case THROW() => Nil; + case LEAVE_FINALIZER(_) => Nil; case _ => - global.abort("The last instruction is not a control flow instruction"); + global.abort("The last instruction is not a control flow instruction: " + lastInstruction); } /** Returns the precessors of this block, in the current 'code' chunk. diff --git a/sources/scala/tools/nsc/backend/icode/Checkers.scala b/sources/scala/tools/nsc/backend/icode/Checkers.scala index 8c3c80756a..73a681ac0c 100644 --- a/sources/scala/tools/nsc/backend/icode/Checkers.scala +++ b/sources/scala/tools/nsc/backend/icode/Checkers.scala @@ -56,6 +56,7 @@ abstract class Checkers { val STRING = REFERENCE(definitions.StringClass); val SCALA_ALL = REFERENCE(definitions.AllClass); val SCALA_ALL_REF = REFERENCE(definitions.AllRefClass); + val CASE_CLASS = REFERENCE(definitions.getClass("scala.CaseClass")); def checkICodes: Unit = { Console.println("[[consistency check at beginning of phase " + globalPhase.name + "]]"); @@ -303,7 +304,7 @@ abstract class Checkers { checkStack(1); val actualType = stack.pop; - if (!(actualType <:< local.kind)) + if (!(actualType <:< local.kind) && actualType != CASE_CLASS) typeError(local.kind, actualType); case STORE_FIELD(field, isStatic) => diff --git a/sources/scala/tools/nsc/backend/icode/TypeKinds.scala b/sources/scala/tools/nsc/backend/icode/TypeKinds.scala index a552537212..e4cf469538 100644 --- a/sources/scala/tools/nsc/backend/icode/TypeKinds.scala +++ b/sources/scala/tools/nsc/backend/icode/TypeKinds.scala @@ -318,7 +318,6 @@ import scala.collection.mutable.{Map, HashMap}; } case ClassInfoType(_, _, sym) => - Console.println("Got a ClassInfoType!"); primitiveTypeMap get sym match { case Some(k) => k; case None => |