Skip to content

Commit 031440e

Browse files
Teach the decompiler about the change
1 parent 7f670df commit 031440e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/printing/DecompilerPrinter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class DecompilerPrinter(_ctx: Context) extends RefinedPrinter(_ctx) {
5757
def isSynthetic(parent: Tree): Boolean = {
5858
val sym = parent.symbol
5959
sym.maybeOwner == defn.ObjectClass ||
60-
(sym == defn.ProductClass && impl.symbol.owner.is(Case))
60+
(sym == defn.ProductClass && impl.symbol.owner.is(Case)) ||
61+
(sym == defn.SerializableClass && impl.symbol.owner.is(Case))
6162
}
6263
val parents = impl.parents.filterNot(isSynthetic)
6364
val body = impl.body.filterNot(_.symbol.is(ParamAccessor))

library/src/scala/tasty/reflect/Printers.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ trait Printers
596596
val parents1 = parents.filter {
597597
case IsTerm(Term.Apply(Term.Select(Term.New(tpt), _), _)) => !Types.JavaLangObject.unapply(tpt.tpe)
598598
case IsTypeTree(TypeTree.Select(Term.Select(Term.Ident("_root_"), "scala"), "Product")) => false
599+
case IsTypeTree(TypeTree.Select(Term.Select(Term.Ident("_root_"), "scala"), "Serializable")) => false
599600
case _ => true
600601
}
601602
if (parents1.nonEmpty)

0 commit comments

Comments
 (0)