-
Notifications
You must be signed in to change notification settings - Fork 21
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
protected class definition is visible in inner scopes via import statement #12589
Comments
Curious if the bug also exists in Scala 3. |
Gee, I get the opposite symptom, where it errors on the locals but not the member (both 2.12 and 2.13):
where as in spark there is a public companion (doesn't seem to matter)
and
|
Scalac 3 correctly issues 4 errors:
|
OK, I confirmed the first example. It errors with However, I could not reproduce the "compiles fine":
|
related https://youtrack.jetbrains.com/issue/SCL-20190
might be related: #11554
Reproduction steps
org.apache.spark.sql.types.AtomicType
isprotected[sql]
Note, it's companion object is public.
These examples are expectedly not compiled, producing compilation error:
These are unexpectedly compiled fine without any compilation errors:
The text was updated successfully, but these errors were encountered: