I have the following code:
mutable struct KiteObserver
length::Vector{Float64}
elevation::Vector{Float64}
end
function KiteObserver()
KiteObserver(Float64[], Float64[])
end
I get the warning:
Possible method call error.Julia(IncorrectCallArgs)
Float64(x [, mode::RoundingMode])
Any idea why? Is it a bug? Is there a workaround?
Hello,
I cannot recreate this warning. Can it be something with the Julia version? The version I am using is 1.10.2.
I also have problems to replicate with an MWE. It happens in this code:
# observe the flight path and collect useful information to optimize it
mutable struct KiteObserver
time::Vector{Float64}
length::Vector{Float64}
fig8::Vector{Int64}
elevation::Vector{Float64}
end
function KiteObserver()
KiteObserver(Float64[], Float64[], Int64[], Float64[])
end
I checked it on two computers, so it is not a problem with my specific VSCode installation.
Output of versioninfo():
julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 15 default, 1 interactive, 16 GC (on 32 virtual cores)
Environment:
LD_LIBRARY_PATH = /lib:/usr/lib:/usr/local/lib
Using the latest stable version of the VSCode Julia extension, v1.75.2
.
lmiq
April 7, 2024, 12:47pm
4
I also have some wrong warnings like that. I think I have at some point disabled the method call warnings (not sure how). It is a bug, certainly. Sometimes hard to reproduce.