Skip to content

Commit e80758c

Browse files
committed
fix compile test to be world-aware
1 parent 4bce889 commit e80758c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/compile.jl

+8-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ try
127127
end
128128
wait(t)
129129

130-
let Foo = eval(Main, Foo_module)
130+
let Foo = getfield(Main, Foo_module)
131+
@test_throws MethodError Foo.foo(17) # world shouldn't be visible yet
132+
end
133+
@eval let Foo_module = $(QuoteNode(Foo_module)), # use @eval to see the results of loading the compile
134+
Foo = getfield(Main, Foo_module),
135+
dir = $(QuoteNode(dir)),
136+
cachefile = $(QuoteNode(cachefile)),
137+
Foo_file = $(QuoteNode(Foo_file))
131138
@test Foo.foo(17) == 18
132139
@test Foo.Bar.bar(17) == 19
133140

0 commit comments

Comments
 (0)