File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -1441,19 +1441,19 @@ def test_narrow_type_to_constant_bool_false(self):
14411441 def f (n ):
14421442 trace = []
14431443 for i in range (n ):
1444- # f is always False, but we can only prove that it's a bool:
1445- f = i == TIER2_THRESHOLD
1444+ # false *usually* False, but we can only prove that it's a bool:
1445+ false = i % 100 == 0
14461446 trace .append ("A" )
1447- if not f : # Kept.
1447+ if not false : # Kept.
14481448 trace .append ("B" )
1449- if not f : # Removed!
1449+ if not false : # Removed!
14501450 trace .append ("C" )
14511451 trace .append ("D" )
1452- if f : # Removed!
1452+ if false : # Removed!
14531453 trace .append ("X" )
14541454 trace .append ("E" )
14551455 trace .append ("F" )
1456- if f : # Removed!
1456+ if false : # Removed!
14571457 trace .append ("X" )
14581458 trace .append ("G" )
14591459 return trace
@@ -1472,19 +1472,19 @@ def test_narrow_type_to_constant_bool_true(self):
14721472 def f (n ):
14731473 trace = []
14741474 for i in range (n ):
1475- # f is always True, but we can only prove that it's a bool:
1476- f = i != TIER2_THRESHOLD
1475+ # true *usually* True, but we can only prove that it's a bool:
1476+ true = i % 100 != 0
14771477 trace .append ("A" )
1478- if f : # Kept.
1478+ if true : # Kept.
14791479 trace .append ("B" )
1480- if not f : # Removed!
1480+ if not true : # Removed!
14811481 trace .append ("X" )
14821482 trace .append ("C" )
1483- if f : # Removed!
1483+ if true : # Removed!
14841484 trace .append ("D" )
14851485 trace .append ("E" )
14861486 trace .append ("F" )
1487- if not f : # Removed!
1487+ if not true : # Removed!
14881488 trace .append ("X" )
14891489 trace .append ("G" )
14901490 return trace
You can’t perform that action at this time.
0 commit comments