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

Visibility problem with locally defined class + companion. #8002

Closed
scabug opened this issue Nov 23, 2013 · 6 comments
Closed

Visibility problem with locally defined class + companion. #8002

scabug opened this issue Nov 23, 2013 · 6 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Nov 23, 2013

A companion object defined locally cannot see private constructors in its companion class.

scala> val a = { class A private; object A { new A } }
<console>:25: error: constructor A in class A cannot be accessed in object A
       val a = { class A private; object A { new A } }
@scabug
Copy link
Author

scabug commented Nov 23, 2013

Imported From: https://issues.scala-lang.org/browse/SI-8002?orig=1
Reporter: Rob Norris (rnorris)
Affected Versions: 2.10.3
See #3772

@scabug
Copy link
Author

scabug commented Nov 23, 2013

@retronym said:
Similar to #3772

@scabug
Copy link
Author

scabug commented Nov 23, 2013

@scabug
Copy link
Author

scabug commented Nov 24, 2013

@retronym said:
scala/scala#3189

@scabug
Copy link
Author

scabug commented Mar 21, 2015

sandeep (phoenix) said:
how to repair this problam ?

@scabug
Copy link
Author

scabug commented Dec 12, 2016

@lrytz said (edited on Dec 12, 2016 2:14:31 PM UTC):
scala/scala#5550 fixes a "TODO" added in PR #3189 (which fixed this ticket)

@scabug scabug closed this as completed Dec 12, 2016
@scabug scabug added this to the 2.12.2 milestone Apr 7, 2017
@scala scala deleted a comment from scabug Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants