Maybe you also repeated using .ToyMod
after redefining ToyMod
? If you did, then you should have seen something like:
WARNING: using ToyMod.Toy in module Main conflicts with an existing identifier.
This would mean that there is already a definition of the struct Toy
in Main
(the one imported the first time you executed using .ToyMod
), and you are trying to modify it, which is not allowed. If you redefine the whole module, but don’t export Toy
(or don’t try to import it twice), there should be no conflict, and ToyMod.Toy
should reflect the new definition. (But if you already have some Toy
object created with the older definition, then the situation can be messy.)
(This doesn’t work if you are tracking the module definition with Revise. You must really rebind ToyMod
to a new module object, not just try to modify the definitions inside it, as said before regarding Maain
.)