summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2016-07-18 12:10:53 +0200
committerGitHub <noreply@github.com>2016-07-18 12:10:53 +0200
commitc901ad6c66ddcaafdd7600027afc330595bcecbb (patch)
tree99a37b6ab0fb1b56df2e29715831c6bc4e676f7c /src/library
parentfbdbfbef1dcab55225fc59d699346878aeed1f6d (diff)
parent26758054f80081a2fec32ed1c7d3fc92efeacb31 (diff)
downloadscala-c901ad6c66ddcaafdd7600027afc330595bcecbb.tar.gz
scala-c901ad6c66ddcaafdd7600027afc330595bcecbb.tar.bz2
scala-c901ad6c66ddcaafdd7600027afc330595bcecbb.zip
Merge pull request #5275 from dwijnand/somex
Deprecated and rename Some#x to Some#value
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/Option.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala
index 7282feebb6..39c583e63b 100644
--- a/src/library/scala/Option.scala
+++ b/src/library/scala/Option.scala
@@ -330,9 +330,11 @@ sealed abstract class Option[+A] extends Product with Serializable {
* @version 1.0, 16/07/2003
*/
@SerialVersionUID(1234815782226070388L) // value computed by serialver for 2.11.2, annotation added in 2.11.4
-final case class Some[+A](x: A) extends Option[A] {
+final case class Some[+A](@deprecatedName('x, "2.12.0") value: A) extends Option[A] {
def isEmpty = false
- def get = x
+ def get = value
+
+ @deprecated("Use .value instead.", "2.12.0") def x: A = value
}