Skip to content

Commit a8c7511

Browse files
nicolasstuckismarter
authored andcommitted
Do not decompile synthetic writeReplace in objects
1 parent 4d96a96 commit a8c7511

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ trait Printers
647647
// Currently the compiler does not allow overriding some of the methods generated for case classes
648648
d.symbol.flags.is(Flags.Synthetic) &&
649649
(d match {
650-
case DefDef("apply" | "unapply", _, _, _, _) if d.symbol.owner.flags.is(Flags.Object) => true
650+
case DefDef("apply" | "unapply" | "writeReplace", _, _, _, _) if d.symbol.owner.flags.is(Flags.Object) => true
651651
case DefDef(n, _, _, _, _) if d.symbol.owner.flags.is(Flags.Case) =>
652652
n == "copy" ||
653653
n.matches("copy\\$default\\$[1-9][0-9]*") || // default parameters for the copy method

0 commit comments

Comments
 (0)