Had a “gotcha” that I don’t understand the behavior of. Bug maybe, or am I missing something here??
Here’s a simplified code example…
“”"
function foo()
wookie = false
f(x) = 5
if wookie
println("wookie activated")
f(x) = 4
end
println(f(1))
end
“”"
4 is what gets printed out.
and my versioninfo…
versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core™ i7-9700K CPU @ 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)