diff options
author | odersky <odersky@gmail.com> | 2016-07-31 13:17:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-31 13:17:28 +0200 |
commit | 54895cdeea0f5bafb404f1cec5a90487d22e1744 (patch) | |
tree | d7afc7f2c61130c01b893bad436a5273a298c9ae | |
parent | 3e6cdefec861f3b7aa98d0f5cced1a58e1908135 (diff) | |
parent | 5a65c91f9fd5ccedae91c478005e729dfcd68ee3 (diff) | |
download | dotty-54895cdeea0f5bafb404f1cec5a90487d22e1744.tar.gz dotty-54895cdeea0f5bafb404f1cec5a90487d22e1744.tar.bz2 dotty-54895cdeea0f5bafb404f1cec5a90487d22e1744.zip |
Merge pull request #1115 from dotty-staging/ensure-bootstrapped-partest
Ensure that partest runs bootstrapped Dotty.
-rw-r--r-- | project/Build.scala | 2 | ||||
-rw-r--r-- | tests/run/defaultGetters.check | 2 | ||||
-rw-r--r-- | tests/run/defaultGetters.scala | 14 |
3 files changed, 17 insertions, 1 deletions
diff --git a/project/Build.scala b/project/Build.scala index a4e6551d7..b7822907d 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -177,7 +177,7 @@ object DottyBuild extends Build { path = file.getAbsolutePath } yield "-Xbootclasspath/p:" + path // dotty itself needs to be in the bootclasspath - val fullpath = ("-Xbootclasspath/a:" + bin) :: path.toList + val fullpath = ("-Xbootclasspath/p:" + "dotty.jar") :: ("-Xbootclasspath/a:" + bin) :: path.toList // System.err.println("BOOTPATH: " + fullpath) val travis_build = // propagate if this is a travis build diff --git a/tests/run/defaultGetters.check b/tests/run/defaultGetters.check new file mode 100644 index 000000000..343171e1d --- /dev/null +++ b/tests/run/defaultGetters.check @@ -0,0 +1,2 @@ +default bar +default baz diff --git a/tests/run/defaultGetters.scala b/tests/run/defaultGetters.scala new file mode 100644 index 000000000..e1a07ff86 --- /dev/null +++ b/tests/run/defaultGetters.scala @@ -0,0 +1,14 @@ +object Test { + + def foo[T](x: T = "abc") = x + def bam(x: => Unit = ()) = x + def bar(x: => Unit = { println("default bar"); () }) = x + def baz(x: => String = { println("default baz"); "cde" }) = x + + def main(args: Array[String]): Unit = { + assert(foo() == "abc") + bam() + bar() + baz() + } +} |