Skip to content

Commit b7b66e6

Browse files
committedMar 20, 2025
Add basic test
This behavior only affects the sysimage, not pkgimages so to avoid creating a standalone sysimage test just for this phenomenon, just verify that we don't have unexpected `macro` code cached in the sysimage.
1 parent 7d4caa1 commit b7b66e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎test/precompile.jl

+5
Original file line numberDiff line numberDiff line change
@@ -2369,4 +2369,9 @@ precompile_test_harness("Package top-level load itself") do load_path
23692369
end
23702370
end
23712371

2372+
# Verify that inference / caching was not performed for any macros in the sysimage
2373+
let m = only(methods(Base.var"@big_str"))
2374+
@test m.specializations === Core.svec() || !isdefined(m.specializations, :cache)
2375+
end
2376+
23722377
finish_precompile_test!()

0 commit comments

Comments
 (0)