From 12aa90f564231e447da2b794c64ddfcba52cc513 Mon Sep 17 00:00:00 2001 From: Jack Zhou Date: Sun, 12 May 2013 21:49:05 -0400 Subject: [PATCH] Create from usage: Renamed guessTypeForExpression to guessTypesForExpression. --- .../jet/plugin/quickfix/CreateFunctionFromUsageFix.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java b/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java index 44edb4870b9..9e679f03ccb 100644 --- a/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java @@ -237,7 +237,7 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase { } } else { assert expressionOfType != null : "!isType() means type == null && expressionOfType != null"; - for (JetType type : guessTypeForExpression(expressionOfType, context)) { + for (JetType type : guessTypesForExpression(expressionOfType, context)) { types.add(type); if (variance == Variance.IN_VARIANCE) { types.addAll(TypeUtils.getAllSupertypes(type)); @@ -1137,7 +1137,7 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase { } @NotNull - private static JetType[] guessTypeForExpression(@NotNull JetExpression expr, @NotNull BindingContext context) { + private static JetType[] guessTypesForExpression(@NotNull JetExpression expr, @NotNull BindingContext context) { JetType type = context.get(BindingContext.EXPRESSION_TYPE, expr); // if we know the actual type of the expression @@ -1350,7 +1350,7 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase { JetType returnJetType = KotlinBuiltIns.getInstance().getIterator().getDefaultType(); BindingContext context = AnalyzerFacadeWithCache.analyzeFileWithCache(jetFile).getBindingContext(); - JetType[] returnJetTypeParameterTypes = guessTypeForExpression(variableExpr, context); + JetType[] returnJetTypeParameterTypes = guessTypesForExpression(variableExpr, context); if (returnJetTypeParameterTypes.length != 1) return null; TypeProjection returnJetTypeParameterType = new TypeProjection(returnJetTypeParameterTypes[0]);