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 f7ecafa commit eebfbd1Copy full SHA for eebfbd1
src/piracy.jl
@@ -1,6 +1,18 @@
1
module Piracy
2
3
-import Test
+if VERSION >= v"1.6-"
4
+ using Test: is_in_mods
5
+else
6
+ function is_in_mods(m::Module, recursive::Bool, mods)
7
+ while true
8
+ m in mods && return true
9
+ recursive || return false
10
+ p = parentmodule(m)
11
+ p === m && return false
12
+ m = p
13
+ end
14
15
+end
16
17
# based on Test/Test.jl#detect_ambiguities
18
# https://github.com/JuliaLang/julia/blob/v1.9.1/stdlib/Test/src/Test.jl#L1838-L1896
@@ -13,7 +25,7 @@ function all_methods(mods::Module...; skip_deprecated::Bool)
25
end
26
function examine(ml::Base.MethodList)
27
for m in ml
- Test.is_in_mods(m.module, true, mods) || continue
28
+ is_in_mods(m.module, true, mods) || continue
29
push!(meths, m)
30
19
31
0 commit comments