@DataClass data class Foo(val x: Int) {
var y: Int
get() = x + 1
}
The generated class attempts to read a y property from the JSON object. It then instantiates Foo by including y in the constructor call, which is invalid and results in a compilation error.
Sample class that illustrates the error:
The generated class attempts to read a
y
property from the JSON object. It then instantiatesFoo
by includingy
in the constructor call, which is invalid and results in a compilation error.