Fix incorrect optimization in ExpressionTypingServices

Previously, it's been working because was almost always
a different instance.

After, the latter change with avoidance of storing trivial
info there, newDataFlowInfo may accidentally become empty
as context.dataFlowInfo.
But we, obviously, should compare it with newContext.dataFlowInfo instead
This commit is contained in:
Denis Zharkov
2018-08-06 17:29:03 +07:00
parent 9297babc20
commit 666ca77666
@@ -297,7 +297,7 @@ public class ExpressionTypingServices {
beforeJumpInfo = result.getJumpFlowInfo();
jumpOutPossible = result.getJumpOutPossible();
}
if (newDataFlowInfo != context.dataFlowInfo) {
if (newDataFlowInfo != newContext.dataFlowInfo) {
newContext = newContext.replaceDataFlowInfo(newDataFlowInfo);
// We take current data flow info if jump there is not possible
}