Why idea scala plug-in work totally on the contrary with Scala compiler

import scala.{Option => _, Either => _, _}

sealed trait Option[+A] {

def map[B](f: A => B): Option[B] = this match{
case None => None
case Some(a) => Some(f(a))

def flatMap[B] (f:A=> Option[B]): Option[B] = {
case None => None
case Some(_) => f(_)

code above
method map() will pass in Scala compiler, but error in Idea.
method flatMap() error in Scala compiler, but no error showed in Idea

I use Idea 15.0.2, Scala plug-in 2.2.0,
Scala SDK 11.7.2
Comment actions Permalink

Hi, Patrick!

sorry for the inconvenience,

we have a similar issue https://youtrack.jetbrains.com/issue/SCL-9818, I add a link to your question into it.

Comment actions Permalink

I have tried scala-ide, no this issue.

and error tips better than idea, idea just tops error, no detail reason or reason is just some error, but scala-ide show some detailed error info just like Scala compiler gave.


Please sign in to leave a comment.