Skip to content

Flexible structs #17

@cstjean

Description

@cstjean
@flex struct Foo{A}
   a::A
   b::Int
end

becomes

struct Foo{A}
    __attributes__::Dict
end
getproperty(f::Foo{A}, sym) where A = (sym==:a ? f.__attributes__[sym]::A : f.__attributes[sym])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions