================
@@ -175,17 +182,15 @@ def get_active_wheres(where: Where, scope: Scope):
# As we visit the script nodes in pre-order traversal, we can always
assume that an expect's parent !where
# has already been visited, and thus should have an entry in
active_where_expects if it is active.
def get_active_expects(expect: Expect, expected_value, scope: Scope):
- if (
- scope.where in active_where_expects
- and active_where_expects[scope.where].frame_idx == 0
- ):
+ if scope.where in active_where_expects and active_where_expects[
+ scope.where
+ ].frame_idx == (scope.get_desired_frame_idx() or 0):
active_where_expects[scope.where].active_expects.append(expect)
def get_active_thens(then: Then, scope: Scope):
- if (
- scope.where in active_where_expects
- and active_where_expects[scope.where].frame_idx == 0
- ):
+ if scope.where in active_where_expects and active_where_expects[
+ scope.where
+ ].frame_idx == (scope.get_desired_frame_idx() or 0):
----------------
OCHyams wrote:
little bit weird looking but I suppose it makes sense since
`get_desired_frame_idx` may return None (no action required, just a note to
self/others)
https://github.com/llvm/llvm-project/pull/203505
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits