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

Make Subject#butWas protected #682

Open
MariusVolkhart opened this issue Apr 20, 2020 · 0 comments
Open

Make Subject#butWas protected #682

MariusVolkhart opened this issue Apr 20, 2020 · 0 comments
Assignees
Labels
P3 not scheduled type=addition A new feature

Comments

@MariusVolkhart
Copy link

@cpovirk explains in comments for Subject.butWas() that it has a better implementation than what developers would typically do. We ran into this today, which implementing our own isEqualTo(). Given that protected access has been considered, I mostly want to indicate that there is interest in this.

  /*
   * TODO(cpovirk): Consider giving this protected access.
   *
   * It is likely better than what users would otherwise do -- `fact("but was", actual)`, which
   * ignores actualCustomStringRepresentation() (which is inaccessible outside the package).
   *
   * But I want to think more about this. In particular, if people use this to reimplement
   * isEqualTo(), I would be sad that they're missing out on its normal special handling. That's
   * probably not enough reason to avoid adding this, but we can hold it back for now.
   */

@netdpb netdpb added P3 not scheduled type=addition A new feature labels Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 not scheduled type=addition A new feature
Projects
None yet
Development

No branches or pull requests

3 participants