Incorrect error highlighting with setter in backticks Follow
I think I've found an issue with the error highlighting in IDEA, when setting a field through its setter method, if putting the field name in backticks (eg. because it's a reserved name).
Here's a code sample which compiles and executes fine (it prints "bar" as expected) :
object Test extends App{ val foo = new MyClass foo.`type` = "bar" println(foo.`type`) }
class MyClass { var _type: String = null def `type`: String = _type def type_=(t: String): Unit = { _type = t }
}
However, foo.`type` = "bar" gets highlighted as an error in IDEA, as shown in this screenshot :
FYI, I noticed this issue while working with ScalaFX, as the "scalafx.scene.shape.Arc" class has a field named "type".
Please sign in to leave a comment.
I created issue about this problem. http://youtrack.jetbrains.com/issue/SCL-7503
Best regards,
Alexander Podkhalyuzin.