Skip to content

Commit d90f14e

Browse files
committed
Merge branch 'fix-7426' into init-dotty
* fix-7426: Fix #7426: Set correct default source for unpickling
2 parents 99e40f9 + ab01ce3 commit d90f14e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ class ClassfileParser(
750750

751751
def unpickleTASTY(bytes: Array[Byte]): Some[Embedded] = {
752752
val unpickler = new tasty.DottyUnpickler(bytes)
753-
unpickler.enter(roots = Set(classRoot, moduleRoot, moduleRoot.sourceModule))
753+
unpickler.enter(roots = Set(classRoot, moduleRoot, moduleRoot.sourceModule))(ctx.withSource(util.NoSource))
754754
Some(unpickler)
755755
}
756756

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class CompilationTests extends ParallelTesting {
6363
compileDir("tests/pos-special/adhoc-extension", defaultOptions.and("-strict", "-feature", "-Xfatal-warnings")),
6464
compileFile("tests/pos-special/i7575.scala", defaultOptions.and("-language:dynamics")),
6565
compileFile("tests/pos-special/kind-projector.scala", defaultOptions.and("-Ykind-projector")),
66+
compileFile("tests/run/i5606.scala", defaultOptions.and("-Yretain-trees")),
6667
).checkCompile()
6768
}
6869

0 commit comments

Comments
 (0)