summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/run/testSome.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/pending/run/testSome.scala b/test/pending/run/testSome.scala
new file mode 100644
index 0000000000..ee5e807151
--- /dev/null
+++ b/test/pending/run/testSome.scala
@@ -0,0 +1,22 @@
+object testSome {
+
+ val x: Option[String] = Some("foo")
+
+ val x1: Option[Int] = Some(3)
+
+ val y: Option[String] = None
+
+ val y1: Option[Int] = None
+
+
+ Console.println(x.isEmpty) // x ne null
+
+ Console.println(x1.isEmpty)
+
+ Console.println(x.get) // x
+
+ Console.println(x1.get)
+
+ def f(x:String) = Some(x)
+ x.flatMap(&f)
+}