From 49b77a152328b55eb2fb1865aaab004bf855048d Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Tue, 27 Jan 2015 18:08:15 +0300 Subject: [PATCH] Reformat code --- .../expressions/ExpressionTypingServices.java | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ExpressionTypingServices.java b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ExpressionTypingServices.java index c87c0591c20..ad05be46cb4 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ExpressionTypingServices.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/ExpressionTypingServices.java @@ -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();