mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Python: Fix bad join in MRO
Fixes a bad join in `list_of_linearization_of_bases_plus_bases`. Previvously, we joined together `ConsList` and `getBase` before filtering these out using the recursive call. Now we do the recursion first. Co-authored-by: yoff <yoff@github.com>
This commit is contained in:
@@ -419,7 +419,9 @@ private ClassListList list_of_linearization_of_bases_plus_bases(ClassObjectInter
|
||||
result = ConsList(bases(cls), EmptyList()) and n = Types::base_count(cls) and n > 1
|
||||
or
|
||||
exists(ClassListList partial |
|
||||
partial = list_of_linearization_of_bases_plus_bases(cls, n + 1) and
|
||||
partial =
|
||||
list_of_linearization_of_bases_plus_bases(pragma[only_bind_into](cls),
|
||||
pragma[only_bind_into](n + 1)) and
|
||||
result = ConsList(Mro::newStyleMro(Types::getBase(cls, n)), partial)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user