From 1067f5f55ca0de0035fee3d0179203801f0b4b87 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 29 Jun 2010 12:32:45 +0000 Subject: close #2413. --- test/files/pos/t2413/TestJava.java | 7 +++++++ test/files/pos/t2413/TestScalac.scala | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/files/pos/t2413/TestJava.java create mode 100644 test/files/pos/t2413/TestScalac.scala (limited to 'test/files/pos/t2413') diff --git a/test/files/pos/t2413/TestJava.java b/test/files/pos/t2413/TestJava.java new file mode 100644 index 0000000000..252c01fbc0 --- /dev/null +++ b/test/files/pos/t2413/TestJava.java @@ -0,0 +1,7 @@ +package pack; + +public class TestJava { + protected String repeatParam(String ... items) { + return "nothing"; + } +} diff --git a/test/files/pos/t2413/TestScalac.scala b/test/files/pos/t2413/TestScalac.scala new file mode 100644 index 0000000000..098e852dd7 --- /dev/null +++ b/test/files/pos/t2413/TestScalac.scala @@ -0,0 +1,23 @@ +import pack.TestJava + +class Foo extends TestJava { + + // THIS METHOD YIELDS TO CRASH +/* def foomethod : Option[String] => Unit = { + case None => + val path = repeatParam("s","a","b","c") + () + case Some(error) => + () + } + + // THIS IS OK + def foomethod2 : String = repeatParam("s","a"); + + // THIS IS OK + val aVal = repeatParam("1","2","3") */ + + // THIS YIELDS TO CRASH + for (a <- 1 to 4 ; anotherVal = repeatParam("1","2","3")) + yield anotherVal +} -- cgit v1.2.3