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

private[this] subverts override accessibility check #11913

Open
lrytz opened this issue Mar 19, 2020 · 0 comments
Open

private[this] subverts override accessibility check #11913

lrytz opened this issue Mar 19, 2020 · 0 comments
Milestone

Comments

@lrytz
Copy link
Member

@lrytz lrytz commented Mar 19, 2020

scala> class C { def f = 0 }
defined class C

scala> class D extends C { private[this] def f = 1 }
defined class D

scala> (new D).f
java.lang.IllegalAccessError: tried to access method D.f()I from class
  ... 28 elided

Should not compile. See the discussion at scala/scala#8810 (comment)

See also #11881

@lrytz lrytz added this to the 2.13.3 milestone Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.