summaryrefslogtreecommitdiff
path: root/test/files/run/t9174.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-03-26 15:37:27 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2015-03-26 15:39:01 +0100
commit67ed11205ce406dd8694e7197296b54ad9e5fee5 (patch)
tree9506281718c7dd297029384b0569b943d2b376e8 /test/files/run/t9174.scala
parent5803ae10505222dfd573eba3dae0be0a1a4d0337 (diff)
downloadscala-67ed11205ce406dd8694e7197296b54ad9e5fee5.tar.gz
scala-67ed11205ce406dd8694e7197296b54ad9e5fee5.tar.bz2
scala-67ed11205ce406dd8694e7197296b54ad9e5fee5.zip
SI-9174 test case
Test case for SI-9174, SI-9173, SI-7402 and SI-7403.
Diffstat (limited to 'test/files/run/t9174.scala')
-rw-r--r--test/files/run/t9174.scala11
1 files changed, 11 insertions, 0 deletions
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
+}