I have the following class:
import scala.util.{Success, Failure, Try} class MyClass { def openFile(fileName: String): Try[String] = { Failure( new
I had SDK in global libraries with a different version of Scala(IntelliJ IDEA). File -> Project Structure -> Global libraries -> Remove SDK -> Rebuild. It fixed the Exception for me.