From aedeab9f49fbbf35ed6817e51420da4de449fd14 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Wed, 4 Feb 2015 16:15:22 +0100 Subject: Workaround #348, linkedClass is broken after flatten --- src/dotty/tools/backend/jvm/DottyBackendInterface.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/backend') diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index 111a5f5f5..651c5d736 100644 --- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -493,7 +493,12 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{ def superClass: Symbol = toDenot(sym).superClass def enclClass: Symbol = toDenot(sym).enclosingClass def linkedClassOfClass: Symbol = linkedClass - def linkedClass: Symbol = toDenot(sym).linkedClass //exitingPickler(sym.linkedClassOfClass) + def linkedClass: Symbol = { + val ct = ctx.withPhase(ctx.flattenPhase.prev) + toDenot(sym)(ct).linkedClass(ct) + // java.util.Attributes.Name$ -> java$util$Attributes$Name$ no companion class after flatten + // see bug #348 + } //exitingPickler(sym.linkedClassOfClass) def companionClass: Symbol = toDenot(sym).companionClass def companionModule: Symbol = toDenot(sym).companionModule def companionSymbol: Symbol = if (sym is Flags.Module) companionClass else companionModule -- cgit v1.2.3