Skip to content

Commit 87ca55d

Browse files
authored
Reenable bootstrap-only tests disabled/dropped in #4833 (#4862)
* Reenable tests disabled/dropped in #4833 `lazyValsSepComp` was dropped in c9f1754 without motivation. After readding it, `dotty-compiler-bootstrapped/testCompilation lazyValsSep` didn't find it; adding the forgotten `checkCompile` call fixed this as well. * Update comment
1 parent 390d987 commit 87ca55d

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
4545
compileDir("compiler/src/dotty/tools/dotc/util", defaultOptions) +
4646
compileDir("compiler/src/dotty/tools/io", defaultOptions) +
4747
compileDir("compiler/src/dotty/tools/dotc/core", TestFlags(classPath, noCheckOptions))
48-
}
48+
}.checkCompile()
4949

5050
@Test def posTwiceWithCompiler: Unit = {
5151
implicit val testGroup: TestGroup = TestGroup("posTwiceWithCompiler")

docs/docs/contributing/testing.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ You can also run all paths of classes of a certain name:
5858
These tests are Scala source files expected to compile with Dotty (pos tests),
5959
along with their expected output (run tests) or errors (neg tests).
6060

61-
All of these tests are contained in the `./tests/*` directories and can be run with the `testCompilation` command.
61+
All of these tests are contained in the `./tests/*` directories and can be run with the `testCompilation` command. Tests in folders named `with-compiler` are an exception, see next section.
6262

6363
Currently to run these tests you need to invoke from sbt:
6464

@@ -79,3 +79,10 @@ $ sbt
7979
This will run both the test `./tests/pos/companions.scala` and
8080
`./tests/neg/companions.scala` since both of these match the given string.
8181
This also means that you could run `testCompilation` with no arguments to run all integration tests.
82+
83+
### Bootstrapped-only tests
84+
85+
To run `testCompilation` on a bootstrapped Dotty compiler, use
86+
`dotty-compiler-bootstrapped/testCompilation` (with the same syntax as above).
87+
Some tests can only be run in bootstrapped compilers; that includes all tests
88+
with `with-compiler` in their name.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package dotty.tools
2+
package io
3+
4+
import java.io.{ InputStream }
5+
import java.util.jar.JarEntry
6+
import dotty.tools.dotc.core.Definitions
7+
import language.postfixOps
8+
import dotty.tools.dotc.core.Contexts._
9+
10+
11+
/** A test to trigger issue with separate compilation and lazy vals */
12+
object Foo {
13+
val definitions: Definitions = null
14+
def defn = definitions
15+
def go = defn.FunctionClassPerRun
16+
}

0 commit comments

Comments
 (0)