Bug Or 'Feature' witn Kotlin 1.4 + Jackson 2.11 ...
# announcements
d
Bug Or 'Feature' witn Kotlin 1.4 + Jackson 2.11 Updateing code previously compiling with Kotlin 1.3.61 , Jackson 2.9.8 to Kotlin 1.4 + Jackson 2.11 This Java function
Copy code
public <T extends JsonNode> T set(String fieldName,
                                  JsonNode value)
Is throwing off Kotlins type inference for expressions like val node : ObjectNode = /// assign val value : JsonNode = // assign node.set("field" , value ) and node["field"] = value The error is cannot determine type for type parameter T I can get the former to work with node.set<JsonNode>( "field", value ) I have not gotten the later to work at all -- I dont know how to explicty type the fun type parameters to an operator overload These lame attempts didnt work -- but I didnt expect them node<JsonNode>{"field" ] = value node([<JsonNode>) "field" ] = value
m
seems to be a fault on the Java function. The Java function specifies a Type T, but never uses it in the function itself it seems.
a
This looks like a potential Kotlin regression in new type inference. Can you please report an issue at http://kotl.in/issue with self-contained code sample to reproduce. Thanks!