isBlock fixed for doWhile
This commit is contained in:
@@ -133,6 +133,6 @@ public class BindingTraceContext extends BindingTrace implements BindingContext
|
||||
|
||||
@Override
|
||||
public boolean isBlock(JetFunctionLiteralExpression expression) {
|
||||
return expression.hasParameterSpecification() || blocks.contains(expression);
|
||||
return !expression.hasParameterSpecification() && blocks.contains(expression);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -693,6 +693,7 @@ public class JetTypeInferrer {
|
||||
WritableScope writableScope = semanticServices.createWritableScope(scope, scope.getContainingDeclaration());
|
||||
conditionScope = writableScope;
|
||||
getBlockReturnedTypeWithWritableScope(writableScope, function.getBody(), LabeledJumpDomain.ERROR); // TODO
|
||||
trace.recordBlock(function);
|
||||
} else {
|
||||
getType(scope, body, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user