@@ -162,12 +162,14 @@ sealed abstract class Either[+A, +B] extends Product with Serializable {
162
162
* for (e <- interactWithDB(someQuery).left) log(s"query failed, reason was $e")
163
163
* }}}
164
164
*/
165
+ @ deprecated(" use swap instead" , " 2.13.0" )
165
166
def left = Either .LeftProjection (this )
166
167
167
168
/** Projects this `Either` as a `Right`.
168
169
*
169
170
* Because `Either` is right-biased, this method is not normally needed.
170
171
*/
172
+ @ deprecated(" Either is now right-biased" , " 2.13.0" )
171
173
def right = Either .RightProjection (this )
172
174
173
175
/** Applies `fa` if this is a `Left` or `fb` if this is a `Right`.
@@ -476,6 +478,7 @@ object Either {
476
478
* @version 1.0, 11/10/2008
477
479
* @see [[scala.util.Either#left ]]
478
480
*/
481
+ @ deprecated(" use swap instead" , " 2.13.0" )
479
482
final case class LeftProjection [+ A , + B ](e : Either [A , B ]) {
480
483
/** Returns the value from this `Left` or throws `java.util.NoSuchElementException`
481
484
* if this is a `Right`.
@@ -620,6 +623,7 @@ object Either {
620
623
* @author <a href="mailto:research@workingmouse.com">Tony Morris</a>, Workingmouse
621
624
* @version 1.0, 11/10/2008
622
625
*/
626
+ @ deprecated(" Either is now right-biased" , " 2.13.0" )
623
627
final case class RightProjection [+ A , + B ](e : Either [A , B ]) {
624
628
625
629
/** Returns the value from this `Right` or throws
0 commit comments