From c1013cc198341f3550232f431fbdc7d9b5eaaf4c Mon Sep 17 00:00:00 2001 From: Toshiaki Kameyama Date: Wed, 26 Sep 2018 12:15:27 +0900 Subject: [PATCH] "Convert to secondary constructor": Fix false positive with delegation #KT-27061 Fixed --- .../ConvertPrimaryConstructorToSecondaryIntention.kt | 3 ++- .../convertPrimaryConstructorToSecondary/delegation.kt | 5 +++++ .../kotlin/idea/intentions/IntentionTestGenerated.java | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 idea/testData/intentions/convertPrimaryConstructorToSecondary/delegation.kt diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertPrimaryConstructorToSecondaryIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertPrimaryConstructorToSecondaryIntention.kt index 033ea866729..d360b47a11a 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertPrimaryConstructorToSecondaryIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertPrimaryConstructorToSecondaryIntention.kt @@ -42,7 +42,8 @@ class ConvertPrimaryConstructorToSecondaryIntention : SelfTargetingIntentions: String, b: Base): Base by b \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 6b9f6ea1721..e8cb98175c7 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -5755,6 +5755,11 @@ public class IntentionTestGenerated extends AbstractIntentionTest { runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/defaultValueChain.kt"); } + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/delegation.kt"); + } + @TestMetadata("enum.kt") public void testEnum() throws Exception { runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/enum.kt");