summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-07-13 08:42:11 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-07-13 11:45:02 +1000
commit18e3e61778918e4e802b8fb75789635409523372 (patch)
tree18d67da301f0b63667e9393d3e336b1fcb5e1875 /src/library
parentb92c3aff1ab8c76c4816bd7b1a82a0f87d787837 (diff)
parent52fde52920d93325310e5544991feeea03e5c763 (diff)
downloadscala-18e3e61778918e4e802b8fb75789635409523372.tar.gz
scala-18e3e61778918e4e802b8fb75789635409523372.tar.bz2
scala-18e3e61778918e4e802b8fb75789635409523372.zip
Merge remote-tracking branch 'origin/2.11.x' into merge/2.11.x-to-2.12.x-20150713
Conflicts: src/eclipse/partest/.classpath src/eclipse/repl/.classpath test/files/run/nothingTypeNoFramesNoDce.scala test/files/run/repl-javap-app.check Also fixup two .classpath files with updated partest, xml and parser combinators JARs.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/Predef.scala5
-rw-r--r--src/library/scala/collection/generic/MutableSortedSetFactory.scala2
-rw-r--r--src/library/scala/collection/immutable/StringOps.scala7
-rw-r--r--src/library/scala/sys/BooleanProp.scala1
-rw-r--r--src/library/scala/sys/Prop.scala4
5 files changed, 14 insertions, 5 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 012e7afd74..281e056330 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -82,6 +82,11 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef {
*/
def classOf[T]: Class[T] = null // This is a stub method. The actual implementation is filled in by the compiler.
+ /** The `String` type in Scala has methods that come either from the underlying
+ * Java String (see the documentation corresponding to your Java version, for
+ * example [[http://docs.oracle.com/javase/8/docs/api/java/lang/String.html]]) or
+ * are added implicitly through [[scala.collection.immutable.StringOps]].
+ */
type String = java.lang.String
type Class[T] = java.lang.Class[T]
diff --git a/src/library/scala/collection/generic/MutableSortedSetFactory.scala b/src/library/scala/collection/generic/MutableSortedSetFactory.scala
index 0339a523e9..9bb12c2317 100644
--- a/src/library/scala/collection/generic/MutableSortedSetFactory.scala
+++ b/src/library/scala/collection/generic/MutableSortedSetFactory.scala
@@ -24,7 +24,7 @@ abstract class MutableSortedSetFactory[CC[A] <: mutable.SortedSet[A] with Sorted
/**
* mutable.SetBuilder uses '+' which is not a primitive for anything extending mutable.SetLike,
- * this causes serious perfomances issues since each time 'elems = elems + x'
+ * this causes serious performance issues since each time 'elems = elems + x'
* is evaluated elems is cloned (which is O(n)).
*
* Fortunately GrowingBuilder comes to rescue.
diff --git a/src/library/scala/collection/immutable/StringOps.scala b/src/library/scala/collection/immutable/StringOps.scala
index 6737692fb1..77333badf9 100644
--- a/src/library/scala/collection/immutable/StringOps.scala
+++ b/src/library/scala/collection/immutable/StringOps.scala
@@ -12,10 +12,9 @@ package immutable
import mutable.StringBuilder
-/**
- * This class serves as a wrapper providing `String`s with all the operations
- * found in indexed sequences. Where needed, instances of `String` object
- * are implicitly converted into this class.
+/** This class serves as a wrapper providing [[scala.Predef.String]]s with all
+ * the operations found in indexed sequences. Where needed, `String`s are
+ * implicitly converted into instances of this class.
*
* The difference between this class and `WrappedString` is that calling transformer
* methods such as `filter` and `map` will yield a `String` object, whereas a
diff --git a/src/library/scala/sys/BooleanProp.scala b/src/library/scala/sys/BooleanProp.scala
index e5e4668edb..b0008b41fd 100644
--- a/src/library/scala/sys/BooleanProp.scala
+++ b/src/library/scala/sys/BooleanProp.scala
@@ -50,6 +50,7 @@ object BooleanProp {
def get: String = "" + value
val clear, enable, disable, toggle = ()
def option = if (isSet) Some(value) else None
+ //def or[T1 >: Boolean](alt: => T1): T1 = if (value) true else alt
protected def zero = false
}
diff --git a/src/library/scala/sys/Prop.scala b/src/library/scala/sys/Prop.scala
index 17ae8cb69c..52a3d89ecb 100644
--- a/src/library/scala/sys/Prop.scala
+++ b/src/library/scala/sys/Prop.scala
@@ -58,6 +58,10 @@ trait Prop[+T] {
*/
def option: Option[T]
+ // Do not open until 2.12.
+ //** This value if the property is set, an alternative value otherwise. */
+ //def or[T1 >: T](alt: => T1): T1
+
/** Removes the property from the underlying map.
*/
def clear(): Unit