From ab6cc8b8eaf6850b75af4dfc182b0f0f70f39c5d Mon Sep 17 00:00:00 2001 From: Jack Zhou Date: Thu, 2 May 2013 11:42:00 -0400 Subject: [PATCH] Create from usage: Fixed swapped co-/contravariant comments. --- .../jet/plugin/quickfix/CreateFunctionFromUsageFix.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java b/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java index 81f67c0be8c..e5c1248c1c5 100644 --- a/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/CreateFunctionFromUsageFix.java @@ -1012,13 +1012,13 @@ public class CreateFunctionFromUsageFix extends CreateFromUsageFixBase { } break; case IN_VARIANCE: - // for covariant (e.g. function parameter), can replace type with any of its supertypes + // for contravariant (e.g. function parameter), can replace type with any of its supertypes if (JetTypeChecker.INSTANCE.isSubtypeOf(type, substitution.getForType())) { return substitution.getByType(); } break; case OUT_VARIANCE: - // for contravariant (e.g. function return value), can replace type with any of its subtypes + // for covariant (e.g. function return value), can replace type with any of its subtypes if (JetTypeChecker.INSTANCE.isSubtypeOf(substitution.getForType(), type)) { return substitution.getByType(); }