Let's say after you defined qqq, you defined/used a function with an 
argument of type qqq. The JIT has now compiled and cached a function 
specialized for the original definition of qqq. If qqq can be redefined, 
that function needs to be thrown away, but the system can't track those 
dependencies (yet, see #2385).

There is a workaround: 
http://docs.julialang.org/en/latest/manual/faq/#how-can-i-modify-the-declaration-of-a-type-immutable-in-my-session

On Friday, May 23, 2014 1:21:57 PM UTC-5, Kuba Roth wrote:
>
> Hi there,
> In repl I define a custom composite type such as:
> julia> type qqq
>           rx::Float32
>           ry::Float32
>           rz::Float32
>       end
>
> and then I add another field which throws the following error:
> ERROR: invalid redefinition of constant qqq
>
> Could someone please explain why this is not allowed?
>
> Thanks,
> kuba
>
>

Reply via email to