Skip to content

Commit 167eb86

Browse files
committed
Do not decompile synthetic writeReplace in objects
1 parent 3bfca28 commit 167eb86

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
@@ -641,7 +641,7 @@ trait Printers
641641
// Currently the compiler does not allow overriding some of the methods generated for case classes
642642
d.symbol.flags.is(Flags.Synthetic) &&
643643
(d match {
644-
case DefDef("apply" | "unapply", _, _, _, _) if d.symbol.owner.flags.is(Flags.Object) => true
644+
case DefDef("apply" | "unapply" | "writeReplace", _, _, _, _) if d.symbol.owner.flags.is(Flags.Object) => true
645645
case DefDef(n, _, _, _, _) if d.symbol.owner.flags.is(Flags.Case) =>
646646
n == "copy" ||
647647
n.matches("copy\\$default\\$[1-9][0-9]*") || // default parameters for the copy method

0 commit comments

Comments
 (0)