Closed larchchen closed 2 months ago
thanks!
something seems off here, investigating that this reports functions like this as having a tight loop:
bummer that mypy didn't catch this, oh well
After some investigating, mypy correct determines that the list contains edge instances and the index is an int, but doesn't complain that "an int will never be found in a list of edges". Perhaps that sort of lint has too many false positives (since objects might overload their __in__
methods???) or something. Too bad.
something seems off here, investigating that this reports functions like this as having a tight loop:
There was a bug in the second line of the patch, it should be:
target_edges
contains a list of all edges that terminate at the given basic block. So we need to inspect the list for edges that also source from that block.
I've pushed a fix to the branch.
idx.target_edges_by_basic_block_index[basic_block_index]
is of typeList[Edges]
. The indexbasic_block_index
was definitely not an element.Checklist