lenso icon indicating copy to clipboard operation
lenso copied to clipboard

Bad results with nested types

Open Sega-Zero opened this issue 8 years ago • 1 comments

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.

Sega-Zero avatar Sep 07 '16 10:09 Sega-Zero

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.

narfdotpl avatar Sep 07 '16 11:09 narfdotpl