Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Cannot have several methods for same generic function #8

Closed
mauro3 opened this issue Mar 26, 2015 · 1 comment
Closed

Cannot have several methods for same generic function #8

mauro3 opened this issue Mar 26, 2015 · 1 comment

Comments

@mauro3
Copy link
Owner

mauro3 commented Mar 26, 2015

f(x::Int,y::Int) = 1
f(x::Int,y::Float64) = 1
@traitdef TT{X} begin
    f(X, Int)
    f(X, Float64)
end
@assert length(TT{Int}().methods)==2 # length is 1!

does not work as methods stores only on signature per function.

mauro3 added a commit that referenced this issue Apr 14, 2015
Major overhaul of methods checking in `@traitsdef`

Fixes #2, #8
@mauro3
Copy link
Owner Author

mauro3 commented Apr 14, 2015

Closed with #10

@mauro3 mauro3 closed this as completed Apr 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant