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

I expect private constructor's parameter type is in private scope, but scalac does not allow that. #5217

Closed
scabug opened this issue Nov 23, 2011 · 10 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Nov 23, 2011

private object A {
  private class B

}

// Error
class A private(b: A.B)

/*
// OK if I move the constructor to `def this`:
class A private() {
   private def this(b: A.B) = this()
}
*/
A.scala:6: error: not found: type B
class A private(b: B)
                   ^
one error found
@scabug
Copy link
Author

scabug commented Nov 23, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5217?orig=1
Reporter: @Atry
Affected Versions: 2.9.1

@scabug
Copy link
Author

scabug commented Mar 15, 2013

@adriaanm said:
Un-assigning to foster work stealing, as announced in https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/o8WG4plpNkw

@scabug
Copy link
Author

scabug commented Jul 10, 2013

@adriaanm said:
Unassigning and rescheduling to M6 as previous deadline was missed.

@scabug
Copy link
Author

scabug commented Aug 5, 2014

@gkossakowski said:
The 2.11.2 is out so I'm rescheduling the issue for 2.11.3.

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@retronym said:
Updating fix-by version to 2.11.5.

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@som-snytt said:
This works since 2.10.

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@gourlaysama said:
Since 2.10.1 to be more precise. This appears to have been unknowingly fixed by b74c33e.

@scabug
Copy link
Author

scabug commented Nov 5, 2014

@lrytz said:
Would one of you mind submitting a test case?

@scabug
Copy link
Author

scabug commented Nov 5, 2014

@gourlaysama said:
Sure: scala/scala#4091

@scabug
Copy link
Author

scabug commented Nov 5, 2014

@som-snytt said:
Hey, jinx. scala/scala#4092

Kind of wish jira was Web 2.0 or whatever.

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