File tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -561,7 +561,9 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
561
561
then
562
562
sym.addAnnotation(Annotation (defn.ExperimentalAnnot , sym.span))
563
563
564
- private def scala2LibPatch (tree : TypeDef )(using Context ) =
564
+ // It needs to run at the phase of the postTyper --- otherwise, the test of the symbols will use
565
+ // the transformed denotation with added `Serializable` and `AbstractFunction`.
566
+ private def scala2LibPatch (tree : TypeDef )(using Context ) = atPhase(thisPhase):
565
567
val sym = tree.symbol
566
568
if compilingScala2StdLib && sym.is(ModuleClass ) then
567
569
// Add Serializable to companion objects of serializable classes,
Original file line number Diff line number Diff line change 1
- //> using options -Ysafe-init-global - Ycompile-scala2-library
1
+ //> using options -Ycompile-scala2-library
2
2
case class UninitializedFieldError (msg : String ) extends RuntimeException (msg)
You can’t perform that action at this time.
0 commit comments