summaryrefslogtreecommitdiff
path: root/test-nsc
diff options
context:
space:
mode:
Diffstat (limited to 'test-nsc')
-rwxr-xr-xtest-nsc/files/run/bugs.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test-nsc/files/run/bugs.scala b/test-nsc/files/run/bugs.scala
index 659b49f825..95e66877bd 100755
--- a/test-nsc/files/run/bugs.scala
+++ b/test-nsc/files/run/bugs.scala
@@ -303,6 +303,23 @@ object Bug250Test {
// Bug 257
object Bug257Test {
+ def sayhello(): Unit = { Console.println("I should come 1st and 2nd"); };
+ def sayhi(): Unit = { Console.println("I should come last"); };
+
+ def f1(x: Unit): Unit = ();
+ def f2(x: Unit)(y: Unit): Unit = ();
+
+ def f(x: => Unit) = {
+ f1(x);
+ f2(x);
+ }
+
+ def main(args: Array[String]): Unit = {
+ f(sayhello())(sayhi())
+ }
+}
+
+object Bug257Test {
def sayhello(): Unit = { Console.println("hello"); };
def f1(x: Unit): Unit = ();