When you annotate a constructor parameter of a dat...
# announcements
r
When you annotate a constructor parameter of a data class, does the annotation go to the backing field? I'm trying to parse an XML response with retrofit and SimpleXML but I get an error "parameter 'x' does not have a match in class Y". My code looks like @Root(name = 'y') data class Y(@Element(name = "x") var x: String?). Should I write that differently?