mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Correct the categorization test.
This implies that uncategorized nodes can be compared with anything.
This commit is contained in:
parent
2aef2114c3
commit
742fc0ea0f
@ -112,7 +112,7 @@ extension Algorithm where B: FreeConvertible, B.RollType == Term.LeafType, B.Pur
|
||||
|
||||
public func evaluate<C>(equals: (Term, Term) -> Bool, categorize: Term -> Set<C>) -> B {
|
||||
return evaluate(equals, recur: {
|
||||
(categorize($0).isEmpty || categorize($1).isEmpty) && !categorize($0).intersect(categorize($1)).isEmpty
|
||||
categorize($0).isEmpty || categorize($1).isEmpty || !categorize($0).intersect(categorize($1)).isEmpty
|
||||
? Algorithm($0, $1).evaluate(equals).free
|
||||
: nil
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user