Skip to content

Feature Request: Type Constraints #3

@willtebbutt

Description

@willtebbutt

Firstly, thank you for writing this package -- I wish someone had written this years ago haha.

One extra feature that would be cool to have would be type constraints on the concrete types. I'm imagining something like

@concrete struct Foo{T<:Real}
    x::T
    y<:Real
    z<:AbstractMatrix{T}
end

would be equivalent to

struct Foo{T<:Real, Ty<:Real, Tz<:AbstractMatrix{T}}
    x::T
    y::Ty
    z::Tz
end

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