We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e1bae4 commit 9cad1e0Copy full SHA for 9cad1e0
test/precompile.jl
@@ -875,3 +875,19 @@ precompile_test_harness("Renamed Imports") do load_path
875
Base.compilecache(Base.PkgId("RenameImports"))
876
@test (@eval (using RenameImports; RenameImports.test())) isa Module
877
end
878
+
879
+@testset "issue 38149" begin
880
+ M = Module()
881
+ @eval M begin
882
+ @nospecialize
883
+ f(x, y) = x + y
884
+ f(x::Int, y) = 2x + y
885
+ end
886
+ precompile(M.f, (Int, Any))
887
+ precompile(M.f, (AbstractFloat, Any))
888
+ mis = map(methods(M.f)) do m
889
+ m.specializations[1]
890
891
+ @test any(mi -> mi.specTypes.parameters[2] === Any, mis)
892
+ @test all(mi -> isa(mi.cache, Core.CodeInstance), mis)
893
+end
0 commit comments