Error with same type called from different modules


How could I avoid the following error ?

ERROR: LoadError: MethodError: no method matching getlinearspeedcoeffs(::Main.MultiPro.ProfileMod.VortexElement.LinearPanel, ::Main.MultiPro.ProfileMod.VortexElement.LinearPanel, ::Bool)
Closest candidates are:
getlinearspeedcoeffs(!Matched::Main.MultiPro.VortexElement.LinearPanel, !Matched::Main.MultiPro.VortexElement.LinearPanel, ::Any)

Both modules ‘ProfileMod’ and ‘MultiPro’ use the ‘VortexElement’ module but there seems to be a mismatch since ‘MultiPro’ also uses ‘ProfileMod’.

Error type mismatch

It looks like you’re probably calling include() on the same file multiple times, which is resulting in multiple different copies of the VortexElement module. You essentially never want to include the same file more than once in Julia. Fortunately, this is generally very easy to solve, although I can’t make a precise suggestion without some idea of what your code looks like. For more discussion, see I'm confused with types names


Loading the module with using from a package could work in most cases.