summaryrefslogtreecommitdiff
path: root/test/files/run/t9174.check
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.check
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.check')
-rw-r--r--test/files/run/t9174.check19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t9174.check b/test/files/run/t9174.check
new file mode 100644
index 0000000000..9320a081ff
--- /dev/null
+++ b/test/files/run/t9174.check
@@ -0,0 +1,19 @@
+Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> import scala.util.{Success, Failure}
+import scala.util.{Success, Failure}
+
+scala> def f1(b: Boolean) = if (b) Left(1) else Right(2)
+f1: (b: Boolean)scala.util.Either[Int,Int]
+
+scala> def f2(b: Boolean) = if (b) Nil else 1 :: Nil
+f2: (b: Boolean)List[Int]
+
+scala> def f3(b: Boolean) = if (b) Stream.Empty else new Stream.Cons(1, Stream.Empty)
+f3: (b: Boolean)scala.collection.immutable.Stream[Int]
+
+scala> def f4(b: Boolean) = if (b) Success(1) else Failure(new Exception(""))
+f4: (b: Boolean)scala.util.Try[Int]
+
+scala> :quit