koson
koson copied to clipboard
[BUG] Incorrect conversion of nullable ObjectType
Describe the bug
Nullable ObjectType uses wrong infix function String.to(value: Any?) that leads to incorrect output.
To Reproduce
val a: ObjectType? = obj { "a" to "a" }
val b = obj { "b" to a }
println(b) // prints {"b":"{\"a\":\"a\"}"}
Expected behavior
Contract should probably be changed to String.to(value: ObjectType?) and work similar to other infix functions with nullable types.