Skip to content

Commit 5fafb36

Browse files
authored
Merge pull request #25222 from JuliaLang/teh/methodtable_warn
Fix MethodTable overwrite warning during build
2 parents 915b2e8 + 1b4d495 commit 5fafb36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

base/reflection.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,12 +1089,11 @@ end
10891089
Make method `m` uncallable and force recompilation of any methods that use(d) it.
10901090
"""
10911091
function delete_method(m::Method)
1092-
ccall(:jl_method_table_disable, Cvoid, (Any, Any), MethodTable(m), m)
1092+
ccall(:jl_method_table_disable, Cvoid, (Any, Any), get_methodtable(m), m)
10931093
end
10941094

1095-
function MethodTable(m::Method)
1095+
function get_methodtable(m::Method)
10961096
ft = ccall(:jl_first_argument_datatype, Any, (Any,), m.sig)
1097-
ft == C_NULL && error("Method ", m, " does not correspond to a function type")
10981097
(ft::DataType).name.mt
10991098
end
11001099

0 commit comments

Comments
 (0)