From 855f01b30b37ee8f07612d8e568eda5d408fd2df Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Wed, 11 Jul 2012 22:13:05 +0200 Subject: SI-6064 Add method contains to Option. The Option API more or less mirrors the Collection API, but it seems that somehow this method has been forgotten. Review: @axel22 --- test/files/run/t6064.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/files/run/t6064.scala (limited to 'test/files/run/t6064.scala') diff --git a/test/files/run/t6064.scala b/test/files/run/t6064.scala new file mode 100644 index 0000000000..fc184dd92d --- /dev/null +++ b/test/files/run/t6064.scala @@ -0,0 +1,9 @@ +object Test extends App { + assert(Option(42) contains 42) + assert(Some(42) contains 42) + assert(Option(BigInt(42)) contains 42) + assert(Option(42) contains BigInt(42)) + assert(!(None contains 42)) + assert(Some(null) contains null) + assert(!(Option(null) contains null)) +} \ No newline at end of file -- cgit v1.2.3