Skip to content

Commit 92c9a20

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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)

0 commit comments

Comments
 (0)