aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-05-06 19:27:44 +0200
committerMartin Odersky <odersky@gmail.com>2016-05-23 16:11:45 +0200
commita88de62e5d60fe8ba83d99bd463797e6b173e3d1 (patch)
treeac00eace9d22fde844eab1931cdb1896d35e36ff /src/dotty/tools/backend/jvm/DottyBackendInterface.scala
parentec71e006ea5d506b55ba624999b0d2aa01b2d7c1 (diff)
downloaddotty-a88de62e5d60fe8ba83d99bd463797e6b173e3d1.tar.gz
dotty-a88de62e5d60fe8ba83d99bd463797e6b173e3d1.tar.bz2
dotty-a88de62e5d60fe8ba83d99bd463797e6b173e3d1.zip
Safe equality for core classes:
Name, Symbol, Denotation, Type. This uncovered two nonsensical comparisons, one in CollectEntryPoints, the other in DottyBackendInterface.
Diffstat (limited to 'src/dotty/tools/backend/jvm/DottyBackendInterface.scala')
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index a64ce5900..002a6bf27 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -861,11 +861,11 @@ class DottyBackendInterface(outputDirectory: AbstractFile)(implicit ctx: Context
"If possible, please file a bug on issues.scala-lang.org.")
tp match {
- case ThisType(ArrayClass) => ObjectReference.asInstanceOf[ct.bTypes.ClassBType] // was introduced in 9b17332f11 to fix SI-999, but this code is not reached in its test, or any other test
- case ThisType(sym) => storage.getClassBTypeAndRegisterInnerClass(sym.asInstanceOf[ct.int.Symbol])
- // case t: SingletonType => primitiveOrClassToBType(t.classSymbol)
- case t: SingletonType => t.underlying.toTypeKind(ct)(storage)
- case t: RefinedType => t.parent.toTypeKind(ct)(storage) //parents.map(_.toTypeKind(ct)(storage).asClassBType).reduceLeft((a, b) => a.jvmWiseLUB(b))
+ case tp: ThisType if tp.cls == ArrayClass => ObjectReference.asInstanceOf[ct.bTypes.ClassBType] // was introduced in 9b17332f11 to fix SI-999, but this code is not reached in its test, or any other test
+ case tp: ThisType => storage.getClassBTypeAndRegisterInnerClass(tp.cls.asInstanceOf[ct.int.Symbol])
+ // case t: SingletonType => primitiveOrClassToBType(t.classSymbol)
+ case t: SingletonType => t.underlying.toTypeKind(ct)(storage)
+ case t: RefinedType => t.parent.toTypeKind(ct)(storage) //parents.map(_.toTypeKind(ct)(storage).asClassBType).reduceLeft((a, b) => a.jvmWiseLUB(b))
}
}
}