Skip to content

Commit 46557ee

Browse files
committed
Don't recurse into Base.Threads. Fixes #74
1 parent 8947d80 commit 46557ee

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/JuliaInterpreter.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ function prepare_call(@nospecialize(f), allargs; enter_generated = false)
330330
args = allargs
331331
sig = method.sig
332332
isa(method, TypeMapEntry) && (method = method.func)
333-
if method.module == Core.Compiler || method compiled_methods
333+
if method.module == Core.Compiler || method.module == Base.Threads || method compiled_methods
334334
return Compiled()
335335
end
336336
# Get static parameters

test/interpret.jl

+7
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,10 @@ function add1234(x::Tuple{Int32,Int32,Int32,Int32})
256256
x)
257257
end
258258
@test @interpret(add1234(map(Int32,(2,3,4,5)))) === map(Int32,(3,5,7,9))
259+
260+
# issue #74
261+
let A = [1]
262+
wkd = WeakKeyDict()
263+
@interpret setindex!(wkd, 2, A)
264+
@test wkd[A] == 2
265+
end

0 commit comments

Comments
 (0)