Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Tricks"
uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775"
authors = ["Frames White"]
version = "0.1.9"
version = "0.1.10"

[compat]
julia = "1.0"
Expand Down
6 changes: 5 additions & 1 deletion src/Tricks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ function _method_table_all_edges_all_methods(f, T, world = Base.get_world_counte

# We add an edge to the MethodTable itself so that when any new methods
# are defined, it recompiles the function.
mt_edges = Core.Compiler.vect(mt, Tuple{f,Vararg{Any}})
@static if VERSION < v"1.12.0-DEV.1531"
mt_edges = Core.Compiler.vect(mt, Tuple{f,Vararg{Any}})
else
mt_edges = Core.Compiler.vect(Tuple{f, Vararg{Any}}, mt)
end

# We want to add an edge to _every existing method instance_, so that
# the deletion of any one of them will trigger recompilation of the function.
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end
@test static_method_count(j) == 2

@test (length ∘ collect ∘ static_methods)(j, Tuple{Int}) == 1
@test static_method_count(j, Tuple{Int,Int}) == 1
@test static_method_count(j, Tuple{Int}) == 1
@test (length ∘ collect ∘ static_methods)(j, Tuple{Int,Int}) == 1
@test static_method_count(j, Tuple{Int,Int}) == 1
@test (length ∘ collect ∘ static_methods)(j, Tuple{Int,Int,Int}) == 1
Expand Down Expand Up @@ -158,7 +158,7 @@ end

while length(collect(methods(j))) > 0
Base.delete_method((first ∘ methods)(j))

@static isdefined(Core, Symbol("@latestworld")) && Core.@latestworld
T = Tuple{Any, Vararg{Any}}
@test (length ∘ collect ∘ static_methods)(j, T) == length(collect(methods(j)))
@test static_method_count(j, T) == length(collect(methods(j)))
Expand Down
Loading