Inheritance with impatible type not showing errors?

I have an example like the following:

trait A {
  val name: String
  def printName(): Unit
}

case object B extends A {
  override val name: Int = 3
  override def printName(): Int = 5
}

It is so obvious that the above is wrong (compiler will throw errors telling imcompatible type in both definitions of "override val name" and "override def printName()").
But I don't see any error prompts(without compilation) under Intellij to show such error.
Is this a bug? or it is too much in terms of pre-compile code analysis? Can someone explain this to me?

Btw, I am running on Mac with Intellij 12.

2 comments
Comment actions Permalink

It's not implemented yet. I created issue, not to forget your example too: http://youtrack.jetbrains.com/issue/SCL-6555
Currently we focused on fixing as much as possible "good code is red" examples, then we will add one by one different additional checkings to our analyzer.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Hi, Alex, thanks for your reply. It is great to have a ticket created for this.
I believe IDE affects/improves the way people learn new language.

0

Please sign in to leave a comment.