On Fri, Feb 26, 2016 at 2:39 PM, Tom Breloff <[email protected]> wrote: > So you want to figure out which version of a function will be called during > dispatch? This sounds like you're approaching your problem in the wrong > way. Can you give us what you're really trying to achieve? (as opposed to > asking about a solution to a sub-problem) > > On Fri, Feb 26, 2016 at 2:27 PM, Julia Tylors <[email protected]> wrote: >> >> Hi everyone, >> >> I was wondering whether i can check a call belongs to specific method. For >> example: >> >> function Foo(x::Float64,y::Int64) # lets call this f1 >> #some code >> end >> >> function Foo(x::Int64,y::Float64) # lets call this f2 >> #some code >> end >> >> method =@belongs Foo(3.0,2)
FWIW, if this is just for debugging/testing you are just looking for @which. >> >> I want method to be the function f1? >> >> How can i do this? >> >> Thanks > >
