Skip to content

Commit 78c7473

Browse files
committed
chore: Allow to write tasty for Scala2 symbols under -Ycompile-scala2-library
1 parent 965dbfa commit 78c7473

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
861861
assert(isModifierTag(tag))
862862
writeByte(tag)
863863
}
864-
assert(!flags.is(Scala2x))
864+
if flags.is(Scala2x) then assert(attributes.scala2StandardLibrary)
865865
if (flags.is(Private)) writeModTag(PRIVATE)
866866
if (flags.is(Protected)) writeModTag(PROTECTED)
867867
if (flags.is(Final, butNot = Module)) writeModTag(FINAL)

project/Scala2LibraryBootstrappedMiMaFilters.scala

-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ object Scala2LibraryBootstrappedMiMaFilters {
6666
ProblemFilters.exclude[FinalMethodProblem]("scala.io.Source.NoPositioner"),
6767
ProblemFilters.exclude[FinalMethodProblem]("scala.io.Source.RelaxedPosition"),
6868
ProblemFilters.exclude[FinalMethodProblem]("scala.io.Source.RelaxedPositioner"),
69-
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.reflect.ManifestFactory#NothingManifest.newArray"),
70-
ProblemFilters.exclude[IncompatibleResultTypeProblem]("scala.reflect.ManifestFactory#NullManifest.newArray"),
7169
ProblemFilters.exclude[MissingFieldProblem]("scala.collection.ArrayOps#ReverseIterator.xs"),
7270
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.NonLocalReturnControl.value"),
7371
) ++

0 commit comments

Comments
 (0)