I am running Julia v. 0.5.1-pre+27 and I stumbled in this unexpected behavior:
I defined a function in Julia REPL, e.g.:
and I ran it once, e.g.:
Then I modified the function:
and I ran it again:
to my surpise, the result was still the old one, calculated as
a*b but running:
yielded the correct result:
I tried with different functions and types and the behavior is always the same.
It seems that the method for the type declared in the previous version of the function (here b::Int64) is not updating. Exiting Julia and directly defining the second form of the function results in the correct outcome.
I realized the problem because I was comparing the output of the functions, and it was simple enough, but this behavior is dangerous and may lead to serious problems when trusting the output without crosschecking.