aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/backend/jvm/DottyBackendInterface.scala12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
index 651c5d736..ffb6a0377 100644
--- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
+++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
@@ -490,7 +490,17 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
}
}
def parentSymbols: List[Symbol] = toDenot(sym).info.parents.map(_.typeSymbol)
- def superClass: Symbol = toDenot(sym).superClass
+ def superClass: Symbol = {
+ val t = toDenot(sym).superClass
+ if (t.exists) t
+ else if (sym is Flags.ModuleClass) {
+ // workaround #371
+
+ println(s"Warning: mocking up superclass for $sym")
+ ObjectClass
+ }
+ else t
+ }
def enclClass: Symbol = toDenot(sym).enclosingClass
def linkedClassOfClass: Symbol = linkedClass
def linkedClass: Symbol = {