summaryrefslogtreecommitdiff
path: root/src/library/scala/Option.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-20 14:33:59 -0700
committerPaul Phillips <paulp@improving.org>2012-09-20 15:07:28 -0700
commit2097a653642927c39b1cb614546240ac9213f3fb (patch)
tree646778309893b3394fc36c720bd0bda4e0f86006 /src/library/scala/Option.scala
parentfeb77881ff8bc1e46c8ae4317a9d95cbf97e34bd (diff)
parentc065bde5f50cae3e1fa6d0724e2043818d6301e9 (diff)
downloadscala-2097a653642927c39b1cb614546240ac9213f3fb.tar.gz
scala-2097a653642927c39b1cb614546240ac9213f3fb.tar.bz2
scala-2097a653642927c39b1cb614546240ac9213f3fb.zip
Merge branch '2.10.x'
* 2.10.x: (36 commits) Normalized line endings. New .gitattributes file. Disabled failing build manager tests. New test case for SI-6337 New test case for closing SI-6385 Value classes: eliminated half-boxing Cleanup of OverridingPairs Fixes SI-6260 Use faster download URL now that artifactory is fixed. don't try to create tags w/o scala-reflect.jar some small remaining fixes SI-5943 toolboxes now autoimport Predef and scala Fix for loud test. SI-6363 deploys the updated starr SI-6363 removes scala.reflect.base SI-6392 wraps non-terms before typecheck/eval SI-6394 fixes macros.Context.enclosingClass Error message improvement for SI-6336. Adjustments to scala.concurrent.duration. prepping for the refactoring ... Conflicts: src/actors-migration/scala/actors/Pattern.scala src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/library/scala/collection/immutable/Vector.scala test/files/jvm/actmig-PinS_1.scala test/files/jvm/actmig-PinS_2.scala test/files/jvm/actmig-PinS_3.scala test/files/jvm/actmig-public-methods_1.scala
Diffstat (limited to 'src/library/scala/Option.scala')
-rw-r--r--src/library/scala/Option.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala
index d241b86b91..755071a14f 100644
--- a/src/library/scala/Option.scala
+++ b/src/library/scala/Option.scala
@@ -196,7 +196,7 @@ sealed abstract class Option[+A] extends Product with Serializable {
/** Necessary to keep $option from being implicitly converted to
* [[scala.collection.Iterable]] in `for` comprehensions.
*/
- def withFilter(p: A => Boolean): WithFilter = new WithFilter(p)
+ @inline final def withFilter(p: A => Boolean): WithFilter = new WithFilter(p)
/** We need a whole WithFilter class to honor the "doesn't create a new
* collection" contract even though it seems unlikely to matter much in a
@@ -255,7 +255,7 @@ sealed abstract class Option[+A] extends Product with Serializable {
* @return the result of applying `pf` to this $option's
* value (if possible), or $none.
*/
- def collect[B](pf: PartialFunction[A, B]): Option[B] =
+ @inline final def collect[B](pf: PartialFunction[A, B]): Option[B] =
if (!isEmpty && pf.isDefinedAt(this.get)) Some(pf(this.get)) else None
/** Returns this $option if it is nonempty,