aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/backend/jvm/GenBCode.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/backend/jvm/GenBCode.scala')
-rw-r--r--src/dotty/tools/backend/jvm/GenBCode.scala14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/dotty/tools/backend/jvm/GenBCode.scala b/src/dotty/tools/backend/jvm/GenBCode.scala
index 8312a72e7..999cd4137 100644
--- a/src/dotty/tools/backend/jvm/GenBCode.scala
+++ b/src/dotty/tools/backend/jvm/GenBCode.scala
@@ -175,14 +175,12 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
val outF = if (needsOutFolder) getOutFolder(claszSymbol, pcb.thisName) else null;
val plainC = pcb.cnode
- if ((!claszSymbol.companionClass.exists) || !claszSymbol.is(Flags.Module)) {
- // generate TASTY on class if it is there, or on module if it has no companion class
-
- val binary = ctx.compilationUnit.pickler.assembleParts()
- val dataAttr = new CustomAttr(nme.DottyTASTYATTR.toString, binary)
- plainC.visitAttribute(dataAttr)
- }
-
+ if (claszSymbol.isClass) // @DarkDimius is this test needed here?
+ for (pickler <- ctx.compilationUnit.picklers.get(claszSymbol.asClass)) {
+ val binary = pickler.assembleParts()
+ val dataAttr = new CustomAttr(nme.DottyTASTYATTR.toString, binary)
+ plainC.visitAttribute(dataAttr)
+ }
// -------------- bean info class, if needed --------------
val beanC =