Skip to content

Private types leaking in public signatures should be reported as errors even under -language:Scala2 #4154

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

Closed
allanrenucci opened this issue Mar 22, 2018 · 3 comments

Comments

@allanrenucci
Copy link
Contributor

https://travis-ci.org/lampepfl/dotty-community-build/jobs/355301166

Regression introduced in #4013

@smarter
Copy link
Member

smarter commented Mar 22, 2018

The problem comes from a private type leaking into a public signature in scalatest, private leaks are errors on Dotty unless -language:Scala2 is set, then they're only warning. I'll try to patch scalatest to fix this. On the Dotty side, we probably need to make private leaks errors even under -language:Scala2.

smarter added a commit to dotty-staging/scalatest that referenced this issue Mar 22, 2018
Collected appears in the signature of public members, therefore it
cannot be private.

See discussion in scala/scala3#4154
@smarter
Copy link
Member

smarter commented Mar 22, 2018

Fix pushed: dotty-staging/scalatest@39c1f74

@smarter smarter changed the title Regression in Community Build: Scalatest Private types leaking in public signatures should be reported as errors even under -language:Scala2 Mar 22, 2018
allanrenucci pushed a commit to dotty-staging/scalatest that referenced this issue Apr 18, 2018
Collected appears in the signature of public members, therefore it
cannot be private.

See discussion in scala/scala3#4154
allanrenucci pushed a commit to dotty-staging/scalatest that referenced this issue Apr 19, 2018
Collected appears in the signature of public members, therefore it
cannot be private.

See discussion in scala/scala3#4154
@liufengyun
Copy link
Contributor

liufengyun commented Feb 20, 2019

If we implement this check in Scala2 mode, then we can close #5831.

@odersky odersky closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants