Debugger: stop at closing bracket for functions without return statement

This commit is contained in:
Natalia Ukhorskaya
2014-11-06 18:27:51 +03:00
parent 878aac1acb
commit d4b0977381
7 changed files with 27 additions and 2 deletions
@@ -1697,6 +1697,8 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
// If it does not end with return we should return something
// because if we don't there can be VerifyError (specific cases with Nothing-typed expressions)
if (!endsWithReturn(expr)) {
markLineNumber(expr, true);
if (isBlockedNamedFunction && !Type.VOID_TYPE.equals(expressionType(expr))) {
StackValue.none().put(returnType, v);
}