summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Wijnand <dale.wijnand@gmail.com>2016-07-14 18:39:24 +0100
committerDale Wijnand <dale.wijnand@gmail.com>2016-07-14 18:39:24 +0100
commit841fb2559b47259f9e5dc92a390fb4c7760ac218 (patch)
tree619ad27cdc154e9a9b101ebf7aa668df45f3cb5b
parent3c43a7bc389eba0d7d52ef0d0cdb19812c4a8a0f (diff)
downloadscala-841fb2559b47259f9e5dc92a390fb4c7760ac218.tar.gz
scala-841fb2559b47259f9e5dc92a390fb4c7760ac218.tar.bz2
scala-841fb2559b47259f9e5dc92a390fb4c7760ac218.zip
Deprecate and rename Left#a/Right#b to Left#value/Right#value
-rw-r--r--src/library/scala/util/Either.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/library/scala/util/Either.scala b/src/library/scala/util/Either.scala
index 5c61d83a1a..2f1e5d5c33 100644
--- a/src/library/scala/util/Either.scala
+++ b/src/library/scala/util/Either.scala
@@ -345,9 +345,11 @@ sealed abstract class Either[+A, +B] extends Product with Serializable {
* @author <a href="mailto:research@workingmouse.com">Tony Morris</a>, Workingmouse
* @version 1.0, 11/10/2008
*/
-final case class Left[+A, +B](a: A) extends Either[A, B] {
+final case class Left[+A, +B](@deprecatedName('a, "2.12.0") value: A) extends Either[A, B] {
def isLeft = true
def isRight = false
+
+ @deprecated("Use .value instead.", "2.12.0") def a: A = value
}
/**
@@ -356,9 +358,11 @@ final case class Left[+A, +B](a: A) extends Either[A, B] {
* @author <a href="mailto:research@workingmouse.com">Tony Morris</a>, Workingmouse
* @version 1.0, 11/10/2008
*/
-final case class Right[+A, +B](b: B) extends Either[A, B] {
+final case class Right[+A, +B](@deprecatedName('b, "2.12.0") value: B) extends Either[A, B] {
def isLeft = false
def isRight = true
+
+ @deprecated("Use .value instead.", "2.12.0") def b: B = value
}
object Either {