Open Kampfkarren opened 3 years ago
some additional test cases:
while foo and foo or bar do
end
while foo or foo and bar do
end
repeat
--[[...]]
until not foo and not foo
repeat
--[[...]]
until foo or not foo
since derefs can mean index or newindex comes into play, it may not safe to assume the value of the deref is immutable and therefore the presence of duplicated tokens doesn't mean double-checking for the same value
repeat
--[[...]]
until states.fieldWithMaybeSideEffect or states.fieldWithMaybeSideEffect
We already assume __index
doesn't have side-effects in a few places, I think, such as duplicate_condition.