You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module M
struct Container{T}
value::T
end
const IntContainer = Container{Int}
function IntContainer(x::Float64)
return IntContainer(round(Int, x))
end
end # module M
This yields blue squiggles under the definition of function IntContainer(x::Float64) with the following message:
Cannot define function ; it already has a value. Julia(CannotDefineFuncAlreadyHasValue)
This pattern occurs a lot in my package MultiFloats.jl, where I have a generic type MultiFloat{T,N}, and then I define aliases const Float64x2 = MultiFloat{Float64,2} with their own constructors.
The text was updated successfully, but these errors were encountered:
Consider the following Julia code:
This yields blue squiggles under the definition of
function IntContainer(x::Float64)
with the following message:This pattern occurs a lot in my package MultiFloats.jl, where I have a generic type
MultiFloat{T,N}
, and then I define aliasesconst Float64x2 = MultiFloat{Float64,2}
with their own constructors.The text was updated successfully, but these errors were encountered: