True, although that redefines X.g, which will affect all callers of f, not just Y.
On Wed, Feb 17, 2016 at 5:36 PM, Bart Janssens <bar...@gmail.com> wrote: > Hi Julia, > > Not sure if this helps, but wrapping the g definition in X.eval like this: > > module Y > using X > X.eval(:(g(x) = 2x)) > f(4) > end > > seems to make your sample work. > > On Wednesday, February 17, 2016 at 9:19:55 PM UTC+1, Julia Tylors wrote: >> >> julia> module X >> export f >> function f(x) >> g(x) >> end >> end >> X >> >> julia> module Y >> using X >> g(x) = 2x >> f(4) >> end >> ERROR: UndefVarError: g not defined >> in f at ./none:4 >> >>