diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-01 16:52:54 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-01 16:52:54 +0200 |
commit | 3aea9219c40912f1fe501be67e1a630fd595a35d (patch) | |
tree | d6a5634dcaef14f982002fa088df1b5f7ef6b34d /src/library | |
parent | 51971954ace37ad6af8bf354d92f6baf51d16324 (diff) | |
parent | 32f520f3ed78ecde390dc7b1b48d3130e412a9dc (diff) | |
download | scala-3aea9219c40912f1fe501be67e1a630fd595a35d.tar.gz scala-3aea9219c40912f1fe501be67e1a630fd595a35d.tar.bz2 scala-3aea9219c40912f1fe501be67e1a630fd595a35d.zip |
Merge commit '32f520f' into merge/2.11-to-2.12-apr-1
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/annotation/switch.scala | 3 | ||||
-rw-r--r-- | src/library/scala/collection/GenTraversableOnce.scala | 4 | ||||
-rw-r--r-- | src/library/scala/runtime/BoxesRunTime.java | 6 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/library/scala/annotation/switch.scala b/src/library/scala/annotation/switch.scala index 23e3923407..00124cf88b 100644 --- a/src/library/scala/annotation/switch.scala +++ b/src/library/scala/annotation/switch.scala @@ -22,6 +22,9 @@ package scala.annotation } }}} * + * Note: for pattern matches with one or two cases, the compiler generates jump instructions. + * Annotating such a match with `@switch` does not issue any warning. + * * @author Paul Phillips * @since 2.8 */ diff --git a/src/library/scala/collection/GenTraversableOnce.scala b/src/library/scala/collection/GenTraversableOnce.scala index 8c7c754af8..f77462ce88 100644 --- a/src/library/scala/collection/GenTraversableOnce.scala +++ b/src/library/scala/collection/GenTraversableOnce.scala @@ -278,7 +278,7 @@ trait GenTraversableOnce[+A] extends Any { * * @param op the binary operator. * @tparam B the result type of the binary operator. - * @return an option value containing the result of `reduceLeft(op)` is this $coll is nonempty, + * @return an option value containing the result of `reduceLeft(op)` if this $coll is nonempty, * `None` otherwise. */ def reduceLeftOption[B >: A](op: (B, A) => B): Option[B] @@ -290,7 +290,7 @@ trait GenTraversableOnce[+A] extends Any { * * @param op the binary operator. * @tparam B the result type of the binary operator. - * @return an option value containing the result of `reduceRight(op)` is this $coll is nonempty, + * @return an option value containing the result of `reduceRight(op)` if this $coll is nonempty, * `None` otherwise. */ def reduceRightOption[B >: A](op: (A, B) => B): Option[B] diff --git a/src/library/scala/runtime/BoxesRunTime.java b/src/library/scala/runtime/BoxesRunTime.java index a6df20165d..96e0f23f3d 100644 --- a/src/library/scala/runtime/BoxesRunTime.java +++ b/src/library/scala/runtime/BoxesRunTime.java @@ -28,7 +28,7 @@ import scala.math.ScalaNumber; * @version 2.0 */ public final class BoxesRunTime { - private static final int CHAR = 0, BYTE = 1, SHORT = 2, INT = 3, LONG = 4, FLOAT = 5, DOUBLE = 6, OTHER = 7; + private static final int CHAR = 0, /* BYTE = 1, SHORT = 2, */ INT = 3, LONG = 4, FLOAT = 5, DOUBLE = 6, OTHER = 7; /** We don't need to return BYTE and SHORT, as everything which might * care widens to INT. @@ -43,10 +43,6 @@ public final class BoxesRunTime return OTHER; } - private static String boxDescription(Object a) { - return "" + a.getClass().getSimpleName() + "(" + a + ")"; - } - /* BOXING ... BOXING ... BOXING ... BOXING ... BOXING ... BOXING ... BOXING ... BOXING */ public static java.lang.Boolean boxToBoolean(boolean b) { |