From 7c0ea67356683c7b1737f38b897181a24d543e86 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 13 Nov 2012 15:01:38 +0400 Subject: [PATCH] Fix erroneous check when saving EXPRESSION_DATA_FLOW_INFO Before saving a data flow info, we checked if it's the same as that of context, which was passed to us. This proves wrong when eventually somebody asks for a data flow info of the same expression, but with a different context (i.e. with a different data flow info in it) and we return this (different) context's info, whereas we should have returned that of the original context. This could've happened in CandidateResolver, for example. Save data flow info after every expression now, only if it's not empty. No new tests added, see next commit. --- .../types/expressions/ExpressionTypingVisitorDispatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorDispatcher.java b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorDispatcher.java index f6bde380bbf..94407b62873 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorDispatcher.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/types/expressions/ExpressionTypingVisitorDispatcher.java @@ -117,7 +117,7 @@ public class ExpressionTypingVisitorDispatcher extends JetVisitor