-
Notifications
You must be signed in to change notification settings - Fork 21
serious regression in 2.8.1RC3 #3934
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3934?orig=1 |
@paulp said: scalac29 J.java S.scala
S.scala:7: error: method f1 in class J cannot be accessed in test.J
def g1(x: J) = x.f1()
^
S.scala:8: error: method f2 in class J cannot be accessed in test.J
Access to protected method f2 not permitted because
enclosing class class S1 in package nest is not a subclass of
class J in package test where target is defined
def g2(x: J) = x.f2()
^
S.scala:12: error: method f1 in class J cannot be accessed in test.J
def g1(x: J) = x.f1()
^
S.scala:13: error: method f2 in class J cannot be accessed in test.J
Access to protected method f2 not permitted because
prefix type test.J does not conform to
def g2(x: J) = x.f2()
^
four errors found |
@paulp said: Here's a tanslation of Java's accessibility modifiers:
* Java private: PRIVATE flag set, privateWithin == NoSymbol
* Java package: no flag set, privateWithin == enclosing package
* Java protected: PROTECTED flag set, privateWithin == enclosing package
* Java public: no flag set, privateWithin == NoSymbol Even if the limitation on package-scoped access from a nested package was intentional (which I assume it was not) it cannot be correct that S2, which subclasses J, cannot access a protected member. |
@odersky said: |
Joshua Hartman (jhartman) said: |
Sorry I'm only discovering this now, although it's improbable that I found it at all as I wasn't really looking for regressions.
Regression was in RC1 and RC2 as well.
The text was updated successfully, but these errors were encountered: