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 @@ -583,7 +583,9 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
583
583
if ! sym.hasAnnotation(defn.ExperimentalAnnot ) && ctx.settings.experimental.value && isTopLevelDefinitionInSource(sym) then
584
584
sym.addAnnotation(ExperimentalAnnotation (" Added by -experimental" , sym.span))
585
585
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):
587
589
val sym = tree.symbol
588
590
if compilingScala2StdLib && sym.is(ModuleClass ) then
589
591
// 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