Skip to content

Return nothing or the struct in macro struct definitions #33

@jakobjpeters

Description

@jakobjpeters

This is just to be a little more friendly in the REPL :)

julia> @kwarg struct A end # expected `A` or `nothing`
kwarg (generic function with 24 methods)

julia> @kwarg struct B # expected `B` or `nothing`
           x = 1
       end
fielddefaults (generic function with 18 methods)

julia> struct C end # returns `nothing`

julia> @kwdef struct D # returns `D`
           x = 2
       end
D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions