aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/test/dotty/tools/dotc/ParallelTestTests.scala6
-rw-r--r--tests/partest-test/stackOverflow.scala7
2 files changed, 12 insertions, 1 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelTestTests.scala b/compiler/test/dotty/tools/dotc/ParallelTestTests.scala
index 30ec88455..9964be036 100644
--- a/compiler/test/dotty/tools/dotc/ParallelTestTests.scala
+++ b/compiler/test/dotty/tools/dotc/ParallelTestTests.scala
@@ -26,7 +26,8 @@ class ParallelTestTests extends ParallelTesting {
@Test def pos1Error: Unit =
compileFile("../tests/partest-test/posFail1Error.scala", defaultOptions).expectFailure.checkCompile()
- @Test def negMissingAnnot: Unit = compileFile("../tests/partest-test/negMissingAnnot.scala", defaultOptions).expectFailure.checkExpectedErrors()
+ @Test def negMissingAnnot: Unit =
+ compileFile("../tests/partest-test/negMissingAnnot.scala", defaultOptions).expectFailure.checkExpectedErrors()
@Test def negAnnotWrongLine: Unit =
compileFile("../tests/partest-test/negAnnotWrongLine.scala", defaultOptions).expectFailure.checkExpectedErrors()
@@ -48,4 +49,7 @@ class ParallelTestTests extends ParallelTesting {
@Test def runDiffOutput1: Unit =
compileFile("../tests/partest-test/runDiffOutput1.scala", defaultOptions).expectFailure.checkRuns()
+
+ @Test def runStackOverflow: Unit =
+ compileFile("../tests/partest-test/stackOverflow.scala", defaultOptions).expectFailure.checkRuns()
}
diff --git a/tests/partest-test/stackOverflow.scala b/tests/partest-test/stackOverflow.scala
new file mode 100644
index 000000000..b3132cc19
--- /dev/null
+++ b/tests/partest-test/stackOverflow.scala
@@ -0,0 +1,7 @@
+object Test {
+ def foo: Int = bar
+ def bar: Int = foo
+
+ def main(args: Array[String]): Unit =
+ println(foo)
+}