File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,8 @@ trait UntypedTreeInfo extends TreeInfo[Untyped] { self: Trees.Instance[Untyped]
466466 */
467467 private def defKind (tree : Tree )(using Context ): FlagSet = unsplice(tree) match {
468468 case EmptyTree | _ : Import => NoInitsInterface
469+ case tree : TypeDef if ctx.settings.YcompileScala2Library .value =>
470+ if (tree.isClassDef) EmptyFlags else NoInitsInterface
469471 case tree : TypeDef => if (tree.isClassDef) NoInits else NoInitsInterface
470472 case tree : DefDef =>
471473 if tree.unforcedRhs == EmptyTree
@@ -477,6 +479,8 @@ trait UntypedTreeInfo extends TreeInfo[Untyped] { self: Trees.Instance[Untyped]
477479 NoInitsInterface
478480 else if tree.mods.is(Given ) && tree.paramss.isEmpty then
479481 EmptyFlags // might become a lazy val: TODO: check whether we need to suppress NoInits once we have new lazy val impl
482+ else if ctx.settings.YcompileScala2Library .value then
483+ EmptyFlags
480484 else
481485 NoInits
482486 case tree : ValDef => if (tree.unforcedRhs == EmptyTree ) NoInitsInterface else EmptyFlags
Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ object Scala2LibraryBootstrappedMiMaFilters {
1515 ProblemFilters .exclude[FinalClassProblem ](" scala.language$experimental$" ),
1616 ProblemFilters .exclude[FinalClassProblem ](" scala.languageFeature$*$" ),
1717
18- // trait $init$
19- ProblemFilters .exclude[DirectMissingMethodProblem ](" scala.*.$init$" ),
20-
2118 // Value class extension methods
2219 ProblemFilters .exclude[DirectMissingMethodProblem ](" scala.*$extension" ),
2320
You can’t perform that action at this time.
0 commit comments