Skip to content

Commit ffe77a4

Browse files
committed
UnpickleScala2: Scala modules do not set Lazy Flag.
Dotty modules do.
1 parent 49eac6e commit ffe77a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dotty/tools/dotc/core/unpickleScala2/PickleBuffer.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,16 @@ object PickleBuffer {
287287
val shift = ChunkBits
288288
val mask = ChunkSize - 1
289289
assert(6 * ChunkBits == ScalaFlagEnd)
290-
FlagSet(
290+
val t = FlagSet(
291291
map(0)((sflags >>> (shift * 0)).toInt & mask) |
292292
map(1)((sflags >>> (shift * 1)).toInt & mask) |
293293
map(2)((sflags >>> (shift * 2)).toInt & mask) |
294294
map(3)((sflags >>> (shift * 3)).toInt & mask) |
295295
map(4)((sflags >>> (shift * 4)).toInt & mask) |
296296
map(5)((sflags >>> (shift * 5)).toInt & mask)
297297
)
298+
if (!isType && t.is(Module, Lazy))
299+
t | Lazy // scala2 modules do not always set lazy flag. Dotty modules do
300+
else t
298301
}
299302
}

0 commit comments

Comments
 (0)