Used invokelatest to work around world age issue.
authorTim Vaughan <tgvaughan@gmail.com>
Thu, 10 Aug 2017 20:18:33 +0000 (22:18 +0200)
committerTim Vaughan <tgvaughan@gmail.com>
Thu, 10 Aug 2017 20:18:33 +0000 (22:18 +0200)
README.md
src/forth.jl

index 123f3c4..6f30a15 100644 (file)
--- a/README.md
+++ b/README.md
@@ -26,8 +26,8 @@ install it, you will therefore need to use the following command:
 
     julia> Pkg.clone("https://github.com/tgvaughan/forth.jl")
 
-Currently, forth.jl **requires** Julia 0.5. (Incompatabilities between 0.4 and 0.5
-mean that I cannot support both versions.)
+Currently, forth.jl **requires** Julia 0.6. (Incompatabilities exist between
+0.6 and previous versions of julia, particularly the handling of [world age](https://github.com/JuliaLang/julia/pull/17057).)
 
 ## Usage
 
index 947aafb..4c81dc3 100644 (file)
@@ -1,6 +1,6 @@
 module forth
 
-import Base.REPLCompletions
+import Base.REPLCompletions, Base.invokelatest
 
 # VM mem size
 size_mem = 1000000 # 1 mega-int
@@ -123,7 +123,7 @@ function callPrim(addr::Int64)
     if addr >=0 || -addr>length(primitives)
         error("Attempted to execute non-existent primitive at address $addr.")
     else
-        primitives[-addr]()
+               invokelatest(primitives[-addr])
     end
 end
 getPrimName(addr::Int64) = primNames[-addr]