I have this very naive custom data structure and an associated constructor:
module MyModule
struct MyStruct{TG,TF<:AbstractFloat}
g::TG
Δt::TF
end
function MyStruct(g::TG, Δt::TF) where {TG, TF<:AbstractFloat}
return MyStruct(g, Δt)
end
end
and when I try to use it:
using MyModule
I get the following errors:
WARNING: Method definition (::Type{MyModule.MyStruct{TG, TF} where TF<:AbstractFloat where TG})(TG, TF<:AbstractFloat) where {TG, TF<:AbstractFloat} in module MyModule at /Users/grs53/code/scratch/MyModule.jl:4 overwritten at /Users/grs53/code/scratch/MyModule.jl:8.
** incremental compilation may be fatally broken for this module **
I know this constructor does essentially nothing – is that the source of the problem? How should I handle such a case?