From 78c74736fb800cc38a7fe67cab65b630f4cb925d Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Thu, 6 Feb 2025 13:53:08 +0100 Subject: [PATCH] chore: Allow to write tasty for Scala2 symbols under -Ycompile-scala2-library --- compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala | 2 +- project/Scala2LibraryBootstrappedMiMaFilters.scala | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala index 7b80c7c80a21..cf9885d16d1f 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -861,7 +861,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) { assert(isModifierTag(tag)) writeByte(tag) } - assert(!flags.is(Scala2x)) + if flags.is(Scala2x) then assert(attributes.scala2StandardLibrary) if (flags.is(Private)) writeModTag(PRIVATE) if (flags.is(Protected)) writeModTag(PROTECTED) if (flags.is(Final, butNot = Module)) writeModTag(FINAL) diff --git a/project/Scala2LibraryBootstrappedMiMaFilters.scala b/project/Scala2LibraryBootstrappedMiMaFilters.scala index d93f67c8291c..70070fddf3e2 100644 --- a/project/Scala2LibraryBootstrappedMiMaFilters.scala +++ b/project/Scala2LibraryBootstrappedMiMaFilters.scala @@ -66,8 +66,6 @@ object Scala2LibraryBootstrappedMiMaFilters { ProblemFilters.exclude[FinalMethodProblem]("scala.io.Source.NoPositioner"), ProblemFilters.exclude[FinalMethodProblem]("scala.io.Source.RelaxedPosition"), ProblemFilters.exclude[FinalMethodProblem]("scala.io.Source.RelaxedPositioner"), - ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.reflect.ManifestFactory#NothingManifest.newArray"), - ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.reflect.ManifestFactory#NullManifest.newArray"), ProblemFilters.exclude[MissingFieldProblem]("scala.collection.ArrayOps#ReverseIterator.xs"), ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.NonLocalReturnControl.value"), ) ++