From 07d3ab792af6c9b039c23462a4471c8fadbc9e53 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 9 Oct 2015 12:31:33 +0200 Subject: [PATCH] enable infix quickfix in cleanup --- .../kotlin/idea/inspections/KotlinCleanupInspection.kt | 1 + idea/testData/inspections/cleanup/cleanup.kt | 4 ++++ idea/testData/inspections/cleanup/cleanup.kt.after | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt index 060d9da5590..f1e15d652c6 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinCleanupInspection.kt @@ -92,6 +92,7 @@ public class KotlinCleanupInspection(): LocalInspectionTool(), CleanupLocalInspe Errors.NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION, Errors.BACKING_FIELD_SYNTAX_DEPRECATED, Errors.OPERATOR_MODIFIER_REQUIRED, + Errors.INFIX_MODIFIER_REQUIRED, Errors.CALLABLE_REFERENCE_TO_MEMBER_OR_EXTENSION_WITH_EMPTY_LHS, Errors.DEPRECATED_TYPE_PARAMETER_SYNTAX, Errors.MISPLACED_TYPE_PARAMETER_CONSTRAINTS diff --git a/idea/testData/inspections/cleanup/cleanup.kt b/idea/testData/inspections/cleanup/cleanup.kt index 52a697a4995..6b26f0061b1 100644 --- a/idea/testData/inspections/cleanup/cleanup.kt +++ b/idea/testData/inspections/cleanup/cleanup.kt @@ -59,6 +59,8 @@ class C { fun foo() {} fun bar() = ::foo + + fun willBeInfix(i: Int) {} } fun typed() { @@ -66,3 +68,5 @@ fun typed() { fun withTypeParameters() where T : Comparable { } + +C() willBeInfix 1 diff --git a/idea/testData/inspections/cleanup/cleanup.kt.after b/idea/testData/inspections/cleanup/cleanup.kt.after index c2fd2e3d59c..e35756025b9 100644 --- a/idea/testData/inspections/cleanup/cleanup.kt.after +++ b/idea/testData/inspections/cleanup/cleanup.kt.after @@ -58,6 +58,8 @@ class C { fun foo() {} fun bar() = C::foo + + fun willBeInfix(i: Int) {} } fun typed() { @@ -65,3 +67,5 @@ fun typed() { fun withTypeParameters() where T : Cloneable, T : Comparable { } + +C() willBeInfix 1