Skip to content

Commit

Permalink
Merge c4d39de into 0e48ecf
Browse files Browse the repository at this point in the history
  • Loading branch information
kmsquire committed Feb 19, 2020
2 parents 0e48ecf + c4d39de commit c4cc6df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Memoize.jl
Expand Up @@ -47,10 +47,9 @@ macro memoize(args...)
end

fcachename = Symbol("##", f, "_memoized_cache")
mod = @__MODULE__
fcache = isdefined(mod, fcachename) ?
getfield(mod, fcachename) :
Core.eval(mod, :(const $fcachename = ($dicttype)()))
fcache = isdefined(Main, fcachename) ?
getfield(Main, fcachename) :
Core.eval(Main, :(const $fcachename = ($dicttype)()))

if length(kws) == 0
lookup = :($fcache[($(tup...),)]::Core.Compiler.return_type($u, typeof(($(identargs...),))))
Expand Down

0 comments on commit c4cc6df

Please sign in to comment.