Skip to content

@traitfn with multiple traits #90

Open
@ChenZhao44

Description

I am trying to define a method with arguments of multiple traits.

using SimpleTraits
@traitdef Foo{T}
@traitdef Bar{T}

@traitfn f(::S, ::T) where {S, T; Foo{S}, Bar{T}} = nothing

I expect the macro @traitfn will generate a method like

f(::Type{Foo{S}}, ::Type{Bar{T}}, ::S, ::T) where {S, T}

However, it only generated

f(::Type{Foo{S}}, ::S, ::T) where {S, T}

Please correct me if my understanding on trait is wrong.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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