-
Notifications
You must be signed in to change notification settings - Fork 21
Compiler exception in innocent code. #2175
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-2175?orig=1 |
@lrytz said: |
@TiarkRompf said: |
@dragos said: |
@paulp said:
I think this is another variation on the many bugs which swirl around private in case classes. Some I have hacked around unpleasantly, some are still outstanding (especially when you kick it up a notch to private[this]) and I'm not at all sure they can be dealt with sanely. I really wonder why someone would want "private var" as a case class field anyway... I would like to propose off the cuff that neither "private" nor "var" be allowed in the first parameter list to a case class. Put anything you want in the second. OK, so multiple parameter lists to case classes are totally broken right now, but if fixed that would offer some measure of sanity. Not that this doesn't still need to be fixed, but I'm afraid it will end up being another ugly band-aid around the dancing privates. FWIW neither of these crashes: case class Property[T]()(private var t: Int)
case class Property[T](var t: Int) |
Ricky Clarkson (ricky_clarkson) said: |
@paulp said: |
In trunk:
causes:
The text was updated successfully, but these errors were encountered: