Don't return early, since we add patterns to memo before they've been checked
This commit is contained in:
parent
0589fbb1b8
commit
a4b5776208
1 changed files with 0 additions and 3 deletions
|
|
@ -913,9 +913,6 @@ class Pattern:
|
|||
A filtered list in which no pattern is referenced by any other pattern.
|
||||
"""
|
||||
def get_children(pat: Pattern, memo: Set) -> Set:
|
||||
if pat in memo:
|
||||
return memo
|
||||
|
||||
children = set(sp.pattern for sp in pat.subpatterns if sp.pattern is not None)
|
||||
new_children = children - memo
|
||||
memo |= children
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue