Skip to content

Commit a648723

Browse files
committed
precompile now works for abstract (but compilable) signatures
ref JuliaLang/julia#47259
1 parent 32b6ae0 commit a648723

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
@@ -353,10 +353,12 @@ function create_sysimg_object_file(object_file::String,
353353
end
354354
# println(ps)
355355
ps = Core.eval(PrecompileStagingArea, ps)
356-
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
357-
# Skipping them avoids the warning.
358-
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
359-
ms isa Vector || continue
356+
@static if VERSION <= 1.9.0-beta1
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
361+
end
360362
precompile(ps...)
361363
catch e
362364
# See julia issue #28808

0 commit comments

Comments
 (0)