I see the following error: “Shared type ‘X’ doesn't match the original declaration in other module”
This message might be a bit misleading in certain cases, because there is no real definition of “original declaration”. It might be more clear to say it “doesn't match declaration in another module” (and maybe it could even say which module that is?)
For example, in my case I have 2 modules, 1 of which is “exporting” a script file to other modules that contains the shared class. The “original declaration” can be misleading now when the module that is exporting the script is reloaded with a different declaration but any “dependencies” still have the old declaration.