From 885403ea7796ea66f7ec9dfcf7d7d347e7012c8f 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)