Skip to content

Commit f6f28d8

Browse files
committed
fix #1274: test for dotty bootstrap based on tasty
1 parent 01bd948 commit f6f28d8

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

src/dotty/tools/dotc/config/PathResolver.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,14 @@ class PathResolver(implicit ctx: Context) {
220220
import context._
221221

222222
// Assemble the elements!
223+
// Scala application class path takes precedence
223224
def basis = List[Traversable[ClassPath]](
224-
classesInPath(javaBootClassPath), // 1. The Java bootstrap class path.
225-
contentsOfDirsInPath(javaExtDirs), // 2. The Java extension class path.
226-
classesInExpandedPath(javaUserClassPath), // 3. The Java application class path.
227-
classesInPath(scalaBootClassPath), // 4. The Scala boot class path.
228-
contentsOfDirsInPath(scalaExtDirs), // 5. The Scala extension class path.
229-
classesInExpandedPath(userClassPath), // 6. The Scala application class path.
225+
classesInExpandedPath(userClassPath), // 1. The Scala application class path.
226+
classesInPath(javaBootClassPath), // 2. The Java bootstrap class path.
227+
contentsOfDirsInPath(javaExtDirs), // 3. The Java extension class path.
228+
classesInExpandedPath(javaUserClassPath), // 4. The Java application class path.
229+
classesInPath(scalaBootClassPath), // 5. The Scala boot class path.
230+
contentsOfDirsInPath(scalaExtDirs), // 6. The Scala extension class path.
230231
sourcesInPath(sourcePath) // 7. The Scala source path.
231232
)
232233

test/dotc/tests.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,23 @@ class tests extends CompilerTest {
288288
@Test def tasty_dotc_util = compileDir(dotcDir, "util", testPickling)
289289
@Test def tasty_tools_io = compileDir(toolsDir, "io", testPickling)
290290
@Test def tasty_tests = compileDir(testsDir, "tasty", testPickling)
291+
292+
@Test def tasty_bootstrap = {
293+
val opt = List("-classpath", defaultOutputDir)
294+
// first compile dotty
295+
compileDir(dottyDir, ".", List("-deep", "-Ycheck-reentrant", "-strict"))(allowDeepSubtypes)
296+
297+
compileDir(dottyDir, "tools", opt)
298+
compileDir(toolsDir, "dotc", opt)
299+
compileDir(dotcDir, "ast", opt)
300+
compileDir(dotcDir, "config", opt)
301+
compileDir(dotcDir, "parsing", opt)
302+
compileDir(dotcDir, "printing", opt)
303+
compileDir(dotcDir, "repl", opt)
304+
compileDir(dotcDir, "reporting", opt)
305+
compileDir(dotcDir, "rewrite", opt)
306+
compileDir(dotcDir, "transform", opt)
307+
compileDir(dotcDir, "typer", opt)
308+
compileDir(dotcDir, "util", opt)
309+
}
291310
}

0 commit comments

Comments
 (0)