DALDEI
09/01/2020, 11:03 AMpublic <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" ] = valueMichael de Kaste
09/01/2020, 12:07 PMAlexey Belkov [JB]
09/04/2020, 10:00 AM