- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
Open
Description
Hi,
Can someone explain how x::Integer::Small works? What does it mean?
When I macro expand this code:
@traitor function howbig(x::Integer::Small)
    "Teensy..."
endI get the following expansion. Can some one explain to me how the following code works?
quote
    $(Expr(:stagedfunction, :(howbig(x::Integer)), quote
    dict = Traitor.get_trait_table(howbig, Tuple{Integer})
    f = Traitor.trait_dispatch(dict, Tuple{x})
    (Core._expr)(:block, $(Expr(:copyast, :($(QuoteNode(:($(Expr(:meta, :inline)))))))), (Core._expr)(:call, f, :x))
end))
    function _howbig{::Integer::Tuple{Small}}(x::Integer) # REPL[10], line 2:
        "Teensy..."
    end
    d = Traitor.get_trait_table(howbig, Tuple{Integer})
    d[Tuple{Tuple{Small}}] = _howbig{::Integer::Tuple{Small}}
endThanks
Metadata
Metadata
Assignees
Labels
No labels