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.check | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/files/run/t9174.check (limited to 'test/files/run/t9174.check') 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 -- cgit v1.2.3