You could conditionally use Compat. Something like module Foo export isnull if Base.VERSION < v"0.4" using Compat import Compat: isnull else import Base: isnull end # new method for isnull end
should work. On Friday, March 13, 2015 at 8:54:55 AM UTC-7, Avik Sengupta wrote: > > > So JavaCall has always had an "isnull(::JavaObject)" method, which is > exported. > > Now that Base has "Nullable" in v0.4, it also has an isnull(::Nullable) > method exported. > > So far so good. But I want to use Compat for JavaCall, primarily for the > Int/int change. Now, Compat also has an isnull(::Nullable) method exported, > but that is in the module Compat! > > So I cant figure out how to write the definition of "isnull" in JavaCall, > that'll work in all versions of Julia. > > Any help appreciated. > > Regards > - > Avik > > PS> Maybe this is another reason why new functionality should NOT be > backported, even in compat? >
