lenso
lenso copied to clipboard
Bad results with nested types
Say, we have this struct:
struct Person {
struct Name {
let firstName: String
let lastName: String
}
let name: Name
let address: Address
}
and this json config:
{
"models": [
{
"name": "Person.Name",
"properties": [
{"name": "firstName", "type": "String"},
{"name": "lastName", "type": "String"}
]
},
{
"name": "Person",
"properties": [
{"name": "name", "type": "Person.Name"},
{"name": "address", "type": "Address"}
]
}
]
}
The result is not compilable.
At least, the type BoundLensToPerson.Name
should be without dot.
Thanks for finding this. I haven't thought about nested types.
I'll leave this ticket open for potential future reference, but I have no plans for maintaining this project.