From 9b04af996897fef542589d2fd1c4c114cf7bafeb Mon Sep 17 00:00:00 2001 From: Toshiaki Kameyama Date: Mon, 27 May 2019 23:28:57 +0900 Subject: [PATCH] Complete statment for function call: fix wrong right parenthesis place (KT-31595) #KT-31595 Fixed --- .../fixers/KotlinValueArgumentListFixer.kt | 2 +- .../codeInsight/smartEnter/SmartEnterTest.kt | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/editor/fixers/KotlinValueArgumentListFixer.kt b/idea/src/org/jetbrains/kotlin/idea/editor/fixers/KotlinValueArgumentListFixer.kt index 8355b973410..cdc814afe37 100644 --- a/idea/src/org/jetbrains/kotlin/idea/editor/fixers/KotlinValueArgumentListFixer.kt +++ b/idea/src/org/jetbrains/kotlin/idea/editor/fixers/KotlinValueArgumentListFixer.kt @@ -32,7 +32,7 @@ class KotlinValueArgumentListFixer : SmartEnterProcessorWithFixers.Fixer + val aValue = "" + } + """, + """ + fun foo(s: String) = 1 + fun test() { + foo("") + val aValue = "" + } + """ + ) + + fun testValueArgumentList7() = doFileTest( + """ + fun test() { + String.to("123" + val aValue = "" + } + """, + """ + fun test() { + String.to("123") + + val aValue = "" + } + """ + ) + fun doFunTest(before: String, after: String) { fun String.withFunContext(): String { val bodyText = "//----\n${this.trimIndent()}\n//----"