-
Notifications
You must be signed in to change notification settings - Fork 21
Incorrect errors shown in the editor when object defined with same name as case class #2926
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-2926?orig=1 |
@milessabin said: |
@milessabin said: |
@ijuma said: I believe the issue is related to the fact that a companion object is created for case classes, so it doesn't surprise me that the problem goes away with a vanilla class. |
@milessabin said: |
@milessabin said: Unfortunately tweaking the example slightly gets the originally reported error back, package test
object Foo2 {
object Foo {
}
case class Foo(t: String) {
}
} |
@odersky said: |
@odersky said: |
@ijuma said: |
The presentation compiler seems to have issues when an object is defined with the same name as a case class.
Steps to reproduce:
(1) Create a file Foo.scala:
(2) Open editor
(3) Notice that the editor shows two incorrect errors (construction definition not allowed here and constructor Foo is defined twice).
The file is actually compiled fine and nothing is shown in the Problems view. scalac also handles the file fine:
The text was updated successfully, but these errors were encountered: