diff options
author | Stefan Zeiger <szeiger@novocode.com> | 2016-07-18 12:10:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 12:10:53 +0200 |
commit | c901ad6c66ddcaafdd7600027afc330595bcecbb (patch) | |
tree | 99a37b6ab0fb1b56df2e29715831c6bc4e676f7c /src | |
parent | fbdbfbef1dcab55225fc59d699346878aeed1f6d (diff) | |
parent | 26758054f80081a2fec32ed1c7d3fc92efeacb31 (diff) | |
download | scala-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')
-rw-r--r-- | src/library/scala/Option.scala | 6 |
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 } |