Incorrect error highlighting with setter in backticks

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"
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 :
Capture d’écran 2014-08-31 à 20.42.00.png

FYI, I noticed this issue while working with ScalaFX, as the "scalafx.scene.shape.Arc" class has a field named "type".

1 comment
Comment actions Permalink

I created issue about this problem.

Best regards,
Alexander Podkhalyuzin.


Please sign in to leave a comment.