diff --git a/idea/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java b/idea/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java
index 35137f65d30..b710afa01ca 100644
--- a/idea/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java
+++ b/idea/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java
@@ -438,6 +438,14 @@ public class JetControlFlowProcessor {
}
}
+ @Override
+ public void visitTupleExpression(JetTupleExpression expression) {
+ for (JetExpression entry : expression.getEntries()) {
+ value(entry, false);
+ }
+ builder.readNode(expression);
+ }
+
@Override
public void visitTypeProjection(JetTypeProjection typeProjection) {
// TODO : Support Type Arguments. Class object may be initialized at this point");
diff --git a/idea/testData/checker/FunctionReturnTypes.jet b/idea/testData/checker/FunctionReturnTypes.jet
new file mode 100644
index 00000000000..5aa66116cfe
--- /dev/null
+++ b/idea/testData/checker/FunctionReturnTypes.jet
@@ -0,0 +1,18 @@
+fun none()
+
+fun unitEmptyInfer() {}
+fun unitEmpty() : Unit {}
+fun unitEmptyReturn() : Unit {return}
+fun unitShort() : Unit = ()
+fun unitShortConv() : Unit = 1
+fun unitShortNull() : Unit = null
+
+fun intEmpty() : Int {}
+fun intShortInfer() = 1
+fun intShort() : Int = 1
+fun intBlockInfer() {1}
+fun intBlock() : Int {1}
+
+fun blockReturnUnitMismatch() : Int {return}
+fun blockReturnValueTypeMismatch() : Int {return 3.4}
+fun blockReturnValueTypeMatch() : Int {return 1}