summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-26 12:11:48 -0700
committerPaul Phillips <paulp@improving.org>2012-09-26 12:24:44 -0700
commitb45a91fe228be063b9f9192cc135459f32d82ae0 (patch)
treed15e044c3a30711c101fc06b0e638fe2fea478eb
parentd47a15b01557ca6c6416892a98d35324bf0a13d7 (diff)
downloadscala-b45a91fe228be063b9f9192cc135459f32d82ae0.tar.gz
scala-b45a91fe228be063b9f9192cc135459f32d82ae0.tar.bz2
scala-b45a91fe228be063b9f9192cc135459f32d82ae0.zip
Expanded an error message from the backend.
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
index c3fca13374..18e9ae620e 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
@@ -604,11 +604,18 @@ abstract class GenASM extends SubComponent with BytecodeWriters {
val internalName = cachedJN.toString()
val trackedSym = jsymbol(sym)
reverseJavaName.get(internalName) match {
- case None =>
+ case Some(oldsym) if oldsym.exists && trackedSym.exists =>
+ assert(
+ // In contrast, neither NothingClass nor NullClass show up bytecode-level.
+ (oldsym == trackedSym) || (oldsym == RuntimeNothingClass) || (oldsym == RuntimeNullClass),
+ s"""|Different class symbols have the same bytecode-level internal name:
+ | name: $internalName
+ | oldsym: ${oldsym.fullNameString}
+ | tracked: ${trackedSym.fullNameString}
+ """.stripMargin
+ )
+ case _ =>
reverseJavaName.put(internalName, trackedSym)
- case Some(oldsym) =>
- assert((oldsym == trackedSym) || (oldsym == RuntimeNothingClass) || (oldsym == RuntimeNullClass), // In contrast, neither NothingClass nor NullClass show up bytecode-level.
- "how can getCommonSuperclass() do its job if different class symbols get the same bytecode-level internal name: " + internalName)
}
}