Reformat code

This commit is contained in:
Stanislav Erokhin
2015-01-27 18:08:15 +03:00
parent d7297304b9
commit 49b77a1523
@@ -150,13 +150,25 @@ public class ExpressionTypingServices {
}
@NotNull
public JetType safeGetType(@NotNull JetScope scope, @NotNull JetExpression expression, @NotNull JetType expectedType, @NotNull DataFlowInfo dataFlowInfo, @NotNull BindingTrace trace) {
public JetType safeGetType(
@NotNull JetScope scope,
@NotNull JetExpression expression,
@NotNull JetType expectedType,
@NotNull DataFlowInfo dataFlowInfo,
@NotNull BindingTrace trace
) {
JetType type = getType(scope, expression, expectedType, dataFlowInfo, trace);
return AnalyzerPackage.safeType(type, expression);
}
@NotNull
public JetTypeInfo getTypeInfo(@NotNull JetScope scope, @NotNull JetExpression expression, @NotNull JetType expectedType, @NotNull DataFlowInfo dataFlowInfo, @NotNull BindingTrace trace) {
public JetTypeInfo getTypeInfo(
@NotNull JetScope scope,
@NotNull JetExpression expression,
@NotNull JetType expectedType,
@NotNull DataFlowInfo dataFlowInfo,
@NotNull BindingTrace trace
) {
ExpressionTypingContext context = ExpressionTypingContext.newContext(this, trace, scope, dataFlowInfo, expectedType);
return expressionTypingFacade.getTypeInfo(expression, context);
}
@@ -167,13 +179,26 @@ public class ExpressionTypingServices {
}
@Nullable
public JetType getType(@NotNull JetScope scope, @NotNull JetExpression expression, @NotNull JetType expectedType, @NotNull DataFlowInfo dataFlowInfo, @NotNull BindingTrace trace) {
public JetType getType(
@NotNull JetScope scope,
@NotNull JetExpression expression,
@NotNull JetType expectedType,
@NotNull DataFlowInfo dataFlowInfo,
@NotNull BindingTrace trace
) {
return getTypeInfo(scope, expression, expectedType, dataFlowInfo, trace).getType();
}
/////////////////////////////////////////////////////////
public void checkFunctionReturnType(@NotNull JetScope functionInnerScope, @NotNull JetDeclarationWithBody function, @NotNull FunctionDescriptor functionDescriptor, @NotNull DataFlowInfo dataFlowInfo, @Nullable JetType expectedReturnType, BindingTrace trace) {
public void checkFunctionReturnType(
@NotNull JetScope functionInnerScope,
@NotNull JetDeclarationWithBody function,
@NotNull FunctionDescriptor functionDescriptor,
@NotNull DataFlowInfo dataFlowInfo,
@Nullable JetType expectedReturnType,
BindingTrace trace
) {
if (expectedReturnType == null) {
expectedReturnType = functionDescriptor.getReturnType();
if (!function.hasBlockBody() && !function.hasDeclaredReturnType()) {
@@ -293,7 +318,8 @@ public class ExpressionTypingServices {
blockLevelVisitor);
}
else {
result = blockLevelVisitor.getTypeInfo(statementExpression, newContext.replaceContextDependency(ContextDependency.INDEPENDENT), true);
result = blockLevelVisitor
.getTypeInfo(statementExpression, newContext.replaceContextDependency(ContextDependency.INDEPENDENT), true);
}
DataFlowInfo newDataFlowInfo = result.getDataFlowInfo();