From 67ed11205ce406dd8694e7197296b54ad9e5fee5 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Thu, 26 Mar 2015 15:37:27 +0100 Subject: SI-9174 test case Test case for SI-9174, SI-9173, SI-7402 and SI-7403. --- test/files/run/t9174.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/run/t9174.scala (limited to 'test/files/run/t9174.scala') diff --git a/test/files/run/t9174.scala b/test/files/run/t9174.scala new file mode 100644 index 0000000000..0c70e9bca9 --- /dev/null +++ b/test/files/run/t9174.scala @@ -0,0 +1,11 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ + |import scala.util.{Success, Failure} + |def f1(b: Boolean) = if (b) Left(1) else Right(2) + |def f2(b: Boolean) = if (b) Nil else 1 :: Nil + |def f3(b: Boolean) = if (b) Stream.Empty else new Stream.Cons(1, Stream.Empty) + |def f4(b: Boolean) = if (b) Success(1) else Failure(new Exception("")) + |""".stripMargin +} -- cgit v1.2.3