Skip to content

Commit 34a86f8

Browse files
committed
precompile now works for abstract (but compilable) signatures
ref JuliaLang/julia#47259
1 parent 7123a2c commit 34a86f8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/PackageCompiler.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,12 @@ function create_sysimg_object_file(object_file::String,
354354
end
355355
# println(ps)
356356
ps = Core.eval(PrecompileStagingArea, ps)
357-
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
358-
# Skipping them avoids the warning.
359-
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
360-
ms isa Vector || continue
357+
@static if VERSION <= 1.9.0-beta1
358+
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
359+
# Skipping them avoids the warning.
360+
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
361+
ms isa Vector || continue
362+
end
361363
precompile(ps...)
362364
catch e
363365
# See julia issue #28808

0 commit comments

Comments
 (0)