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 3.6.2, 3.5.2, 3.3.4
import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.node.{ JsonNodeFactory, ObjectNode, TextNode } val json: ObjectNode = JsonNodeFactory.instance.objectNode() def foo(a: String): Unit = { a match { case "a" => json.set("type", TextNode.valueOf("value")) case _ => json.set("type", TextNode.valueOf("value")) } } foo("")
method set is a java method:
set
public <T extends JsonNode> T set(String propertyName, JsonNode value)
https://scastie.scala-lang.org/i507EyzXTdO1BM362YaOhA
Caused by: java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class scala.runtime.Nothing$
That it does not crash like in scala2 https://scastie.scala-lang.org/gvqImCf7QeKBXahfClCZHA
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Compiler version
Scala 3.6.2, 3.5.2, 3.3.4
Minimized code
method
set
is a java method:https://scastie.scala-lang.org/i507EyzXTdO1BM362YaOhA
Output
Expectation
That it does not crash like in scala2 https://scastie.scala-lang.org/gvqImCf7QeKBXahfClCZHA
The text was updated successfully, but these errors were encountered: