File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -583,7 +583,9 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
583583 if ! sym.hasAnnotation(defn.ExperimentalAnnot ) && ctx.settings.experimental.value && isTopLevelDefinitionInSource(sym) then
584584 sym.addAnnotation(ExperimentalAnnotation (" Added by -experimental" , sym.span))
585585
586- private def scala2LibPatch (tree : TypeDef )(using Context ) =
586+ // It needs to run at the phase of the postTyper --- otherwise, the test of the symbols will use
587+ // the transformed denotation with added `Serializable` and `AbstractFunction`.
588+ private def scala2LibPatch (tree : TypeDef )(using Context ) = atPhase(thisPhase):
587589 val sym = tree.symbol
588590 if compilingScala2StdLib && sym.is(ModuleClass ) then
589591 // 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
22case class UninitializedFieldError (msg : String ) extends RuntimeException (msg)
You can’t perform that action at this time.
0 commit comments