diff options
author | Martin Odersky <odersky@gmail.com> | 2014-05-07 19:09:52 +0200 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-05-20 13:38:49 +0200 |
commit | 27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e (patch) | |
tree | ab350b5ef2d7b9adc29fe715be2efb4681970127 /tests/disabled/java-interop/pos/t2413 | |
parent | fb3dba1bac13a755d2304928cbd49e7dde6f1bf9 (diff) | |
download | dotty-27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e.tar.gz dotty-27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e.tar.bz2 dotty-27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e.zip |
Tests pos/23xx to 24xx.
Diffstat (limited to 'tests/disabled/java-interop/pos/t2413')
-rw-r--r-- | tests/disabled/java-interop/pos/t2413/TestJava.java | 7 | ||||
-rw-r--r-- | tests/disabled/java-interop/pos/t2413/TestScalac.scala | 23 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/disabled/java-interop/pos/t2413/TestJava.java b/tests/disabled/java-interop/pos/t2413/TestJava.java new file mode 100644 index 000000000..252c01fbc --- /dev/null +++ b/tests/disabled/java-interop/pos/t2413/TestJava.java @@ -0,0 +1,7 @@ +package pack; + +public class TestJava { + protected String repeatParam(String ... items) { + return "nothing"; + } +} diff --git a/tests/disabled/java-interop/pos/t2413/TestScalac.scala b/tests/disabled/java-interop/pos/t2413/TestScalac.scala new file mode 100644 index 000000000..098e852dd --- /dev/null +++ b/tests/disabled/java-interop/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 +} |