We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scala> import play.api.libs.json._ ; Option("a").getOrElse("b") : Json.JsValueWrapper <console>:13: error: type mismatch; found : Object required: play.api.libs.json.Json.JsValueWrapper Option("a").getOrElse("b") : Json.JsValueWrapper ^
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-10250?orig=1 Reporter: Mohammed Azougarh (momoAG) Affected Versions: 2.12.1
Sorry, something went wrong.
I confirm that this is happening to me in 2.12.4
reproducible without the external dependency with:
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_152). Type in expressions for evaluation. Or try :help. scala> import scala.language.implicitConversions import scala.language.implicitConversions scala> class Foo; implicit def string2foo(s: String): Foo = new Foo defined class Foo string2foo: (s: String)Foo scala> (Option("a").getOrElse("b"): String): Foo res0: Foo = Foo@646427f7 scala> Option("a").getOrElse("b"): Foo <console>:15: error: type mismatch; found : Object required: Foo Option("a").getOrElse("b"): Foo ^
whereas in Dotty:
scala> Option("a").getOrElse("b"): Foo val res0: Foo = Foo@7ea08277
No branches or pull requests
The text was updated successfully, but these errors were encountered: