Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation 'Using EitherValues' appears to be outdated #1744

Open
dubaut opened this issue Dec 22, 2019 · 3 comments
Open

Documentation 'Using EitherValues' appears to be outdated #1744

dubaut opened this issue Dec 22, 2019 · 3 comments

Comments

@dubaut
Copy link

dubaut commented Dec 22, 2019

Following the instructions in the documentation for Using EitherValues leads to a Warning.

Repo case:

package dubaut.scalatest

import org.scalatest.EitherValues
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class EitherTest extends AnyFlatSpec with EitherValues with Matchers {
  val eitherValue: Either[Exception, Int] = Right(42)

  eitherValue.right.value should be > 1
}

Result:

Symbol right is deprecated. Either is now right-biased, use methods directly on Either

Side-note: The documentation does not mention explicitly that not only EitherValue needs to be mixed-in but as well org.scalatest.matchers.should.Matchers.

fancywriter added a commit to fancywriter/scalatest that referenced this issue Dec 25, 2019
fancywriter added a commit to fancywriter/scalatest that referenced this issue Dec 25, 2019
@francisdb
Copy link

dupe of #972 ?

@rtyley
Copy link

rtyley commented Mar 1, 2021

Fixed with #1895.

@rtyley
Copy link

rtyley commented Feb 4, 2022

I think I made a mistake- #1895 definitely fixed the supported code, but possibly not the online documentation (which is possibly defined here)? In any case, this is the code snippet currently suggested on https://www.scalatest.org/user_guide/using_EitherValues :

either1.right.value should be > 9

...but what it should say is this, correct?! :

either1.value should be > 9

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants