-
Notifications
You must be signed in to change notification settings - Fork 21
The result of a method, taking an object of some case class, can not be assigned to a variable with the name as the name of any field of that class #5044
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-5044?orig=1 |
@harrah said: val a = Option(x = "")
val x = println(a) |
@paulp said: |
@paulp said: val a = Option(y = "")
val y = println(a) Not like anyone can know a priori one should work and one shouldn't. |
@lrytz said (edited on May 19, 2012 12:26:27 PM UTC): So I think the error is not wrong. Giving an explicit type either to "a" or "y" is the correct way of fixing the code. However the error message is not very explicit about what to do. This is done in [https://github.com/scala/scala/commit/4669ac180e58daf97ac7f73af4622434b439631d] |
@lrytz said:
|
The text was updated successfully, but these errors were encountered: