I have a file myfile.jl with the following lines:
type MyType{T}
x::T
end
1 + 1
Julia returns an error when I repeatedly include this file
include("myfile.jl")
#> 2
include("myfile.jl")
#> ERROR: LoadError: invalid redefinition of constant MyType
The error message only appears if MyType is a parametric type. The error
appears even though MyType is not redefined.
Where does this error come from? Is there a way to avoid it? This forces me
to restart Julia everytime I update myfile
