From 4ea93389753704896274fe067dcd0c86067781a3 Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Tue, 15 Feb 2022 11:01:59 -0500 Subject: [PATCH] add bare-bones blocklisting of types during enumeration Part of #2. No user interface yet (have to change the list in the sources). #2 will be solved after an interface is added. --- src/StabilityCheck.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/StabilityCheck.jl b/src/StabilityCheck.jl index 26e562269..9627d1e6c 100644 --- a/src/StabilityCheck.jl +++ b/src/StabilityCheck.jl @@ -261,6 +261,8 @@ all_subtypes(ts::Vector, scfg :: SearchCfg) = begin result end +blocklist = [Function] + # Auxilliary function: immediate subtypes of a tuple of types `ts` direct_subtypes(ts1::Vector, scfg :: SearchCfg) = begin if isempty(ts1) @@ -268,7 +270,10 @@ direct_subtypes(ts1::Vector, scfg :: SearchCfg) = begin end ts = copy(ts1) t = pop!(ts) - ss_last = subtypes(t) + ss_last = if t ∈ blocklist + [] + else subtypes(t) + end if isempty(ss_last) if typeof(t) == UnionAll ss_last = subtype_unionall(t, scfg)