Move call-site trailing comma to registry

#KT-34744
This commit is contained in:
Dmitry Gridin
2020-02-03 16:44:13 +07:00
parent c34b417d0c
commit b5d0956a5e
45 changed files with 5022 additions and 1422 deletions
@@ -585,10 +585,18 @@ fun main(args: Array<String>) {
testClass<AbstractFormatterTest> { testClass<AbstractFormatterTest> {
model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""")
model(
"formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""",
testMethod = "doTestCallSite", testClassName = "FormatterCallSite"
)
model( model(
"formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", "formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""",
testMethod = "doTestInverted", testClassName = "FormatterInverted" testMethod = "doTestInverted", testClassName = "FormatterInverted"
) )
model(
"formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""",
testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite"
)
} }
testClass<AbstractTypingIndentationTestBase> { testClass<AbstractTypingIndentationTestBase> {
@@ -567,8 +567,18 @@ fun main(args: Array<String>) {
testClass<AbstractFormatterTest> { testClass<AbstractFormatterTest> {
model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""")
model("formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", model(
testMethod = "doTestInverted", testClassName = "FormatterInverted") "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""",
testMethod = "doTestCallSite", testClassName = "FormatterCallSite"
)
model(
"formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""",
testMethod = "doTestInverted", testClassName = "FormatterInverted"
)
model(
"formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""",
testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite"
)
} }
testClass<AbstractTypingIndentationTestBase> { testClass<AbstractTypingIndentationTestBase> {
@@ -567,8 +567,18 @@ fun main(args: Array<String>) {
testClass<AbstractFormatterTest> { testClass<AbstractFormatterTest> {
model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""")
model("formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", model(
testMethod = "doTestInverted", testClassName = "FormatterInverted") "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""",
testMethod = "doTestCallSite", testClassName = "FormatterCallSite"
)
model(
"formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""",
testMethod = "doTestInverted", testClassName = "FormatterInverted"
)
model(
"formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""",
testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite"
)
} }
testClass<AbstractTypingIndentationTestBase> { testClass<AbstractTypingIndentationTestBase> {
@@ -567,8 +567,18 @@ fun main(args: Array<String>) {
testClass<AbstractFormatterTest> { testClass<AbstractFormatterTest> {
model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""")
model("formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", model(
testMethod = "doTestInverted", testClassName = "FormatterInverted") "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""",
testMethod = "doTestCallSite", testClassName = "FormatterCallSite"
)
model(
"formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""",
testMethod = "doTestInverted", testClassName = "FormatterInverted"
)
model(
"formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""",
testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite"
)
} }
testClass<AbstractTypingIndentationTestBase> { testClass<AbstractTypingIndentationTestBase> {
@@ -19,10 +19,7 @@ import com.intellij.psi.tree.TokenSet
import org.jetbrains.kotlin.KtNodeTypes.* import org.jetbrains.kotlin.KtNodeTypes.*
import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings
import org.jetbrains.kotlin.idea.formatter.NodeIndentStrategy.Companion.strategy import org.jetbrains.kotlin.idea.formatter.NodeIndentStrategy.Companion.strategy
import org.jetbrains.kotlin.idea.util.containsLineBreakInThis import org.jetbrains.kotlin.idea.util.*
import org.jetbrains.kotlin.idea.util.isMultiline
import org.jetbrains.kotlin.idea.util.needTrailingComma
import org.jetbrains.kotlin.idea.util.requireNode
import org.jetbrains.kotlin.kdoc.lexer.KDocTokens import org.jetbrains.kotlin.kdoc.lexer.KDocTokens
import org.jetbrains.kotlin.kdoc.parser.KDocElementTypes import org.jetbrains.kotlin.kdoc.parser.KDocElementTypes
import org.jetbrains.kotlin.lexer.KtTokens.* import org.jetbrains.kotlin.lexer.KtTokens.*
@@ -588,7 +585,7 @@ abstract class KotlinCommonBlock(
when { when {
elementType === VALUE_ARGUMENT_LIST -> { elementType === VALUE_ARGUMENT_LIST -> {
val wrapSetting = commonSettings.CALL_PARAMETERS_WRAP val wrapSetting = commonSettings.CALL_PARAMETERS_WRAP
if (!node.trailingCommaIsAllowed && if (!node.addTrailingComma &&
(wrapSetting == CommonCodeStyleSettings.WRAP_AS_NEEDED || wrapSetting == CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM) && (wrapSetting == CommonCodeStyleSettings.WRAP_AS_NEEDED || wrapSetting == CommonCodeStyleSettings.WRAP_ON_EVERY_ITEM) &&
!needWrapArgumentList(nodePsi) !needWrapArgumentList(nodePsi)
) { ) {
@@ -597,7 +594,7 @@ abstract class KotlinCommonBlock(
return getWrappingStrategyForItemList( return getWrappingStrategyForItemList(
wrapSetting, wrapSetting,
VALUE_ARGUMENT, VALUE_ARGUMENT,
node.trailingCommaIsAllowed, node.addTrailingComma,
additionalWrap = trailingCommaWrappingStrategyWithMultiLineCheck(LPAR, RPAR), additionalWrap = trailingCommaWrappingStrategyWithMultiLineCheck(LPAR, RPAR),
) )
} }
@@ -607,7 +604,7 @@ abstract class KotlinCommonBlock(
FUN, PRIMARY_CONSTRUCTOR, SECONDARY_CONSTRUCTOR -> return getWrappingStrategyForItemList( FUN, PRIMARY_CONSTRUCTOR, SECONDARY_CONSTRUCTOR -> return getWrappingStrategyForItemList(
commonSettings.METHOD_PARAMETERS_WRAP, commonSettings.METHOD_PARAMETERS_WRAP,
VALUE_PARAMETER, VALUE_PARAMETER,
node.trailingCommaIsAllowed, node.addTrailingComma,
additionalWrap = trailingCommaWrappingStrategyWithMultiLineCheck(LPAR, RPAR), additionalWrap = trailingCommaWrappingStrategyWithMultiLineCheck(LPAR, RPAR),
) )
FUNCTION_TYPE -> return defaultTrailingCommaWrappingStrategy(LPAR, RPAR) FUNCTION_TYPE -> return defaultTrailingCommaWrappingStrategy(LPAR, RPAR)
@@ -752,8 +749,8 @@ abstract class KotlinCommonBlock(
private fun defaultTrailingCommaWrappingStrategy(leftAnchor: IElementType, rightAnchor: IElementType): WrappingStrategy = private fun defaultTrailingCommaWrappingStrategy(leftAnchor: IElementType, rightAnchor: IElementType): WrappingStrategy =
fun(childElement: ASTNode): Wrap? = trailingCommaWrappingStrategyWithMultiLineCheck(leftAnchor, rightAnchor)(childElement) fun(childElement: ASTNode): Wrap? = trailingCommaWrappingStrategyWithMultiLineCheck(leftAnchor, rightAnchor)(childElement)
private val ASTNode.trailingCommaIsAllowed: Boolean private val ASTNode.addTrailingComma: Boolean
get() = (settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA || get() = (settings.kotlinCustomSettings.addTrailingCommaIsAllowedFor(this) ||
lastChildNode?.let { getSiblingWithoutWhitespaceAndComments(it) }?.elementType === COMMA) && lastChildNode?.let { getSiblingWithoutWhitespaceAndComments(it) }?.elementType === COMMA) &&
psi?.let(PsiElement::isMultiline) == true psi?.let(PsiElement::isMultiline) == true
@@ -821,7 +818,7 @@ abstract class KotlinCommonBlock(
if (!filter(childElement)) return null if (!filter(childElement)) return null
val childElementType = childElement.elementType val childElementType = childElement.elementType
return createWrapAlwaysIf( return createWrapAlwaysIf(
(!checkTrailingComma || childElement.treeParent.trailingCommaIsAllowed) && ( (!checkTrailingComma || childElement.treeParent.addTrailingComma) && (
rightAnchor != null && rightAnchor === childElementType || rightAnchor != null && rightAnchor === childElementType ||
leftAnchor != null && leftAnchor === getSiblingWithoutWhitespaceAndComments(childElement)?.elementType || leftAnchor != null && leftAnchor === getSiblingWithoutWhitespaceAndComments(childElement)?.elementType ||
additionalCheck(childElement) additionalCheck(childElement)
@@ -6,11 +6,17 @@
package org.jetbrains.kotlin.idea.util package org.jetbrains.kotlin.idea.util
import com.intellij.formatting.ASTBlock import com.intellij.formatting.ASTBlock
import com.intellij.lang.ASTNode
import com.intellij.openapi.util.TextRange import com.intellij.openapi.util.TextRange
import com.intellij.openapi.util.UserDataHolder
import com.intellij.openapi.util.registry.Registry
import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.util.text.StringUtil
import com.intellij.psi.PsiDocumentManager import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import com.intellij.psi.codeStyle.CodeStyleSettings import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.tree.TokenSet
import com.intellij.psi.util.PsiUtilCore
import org.jetbrains.kotlin.KtNodeTypes
import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings import org.jetbrains.kotlin.idea.core.formatter.KotlinCodeStyleSettings
import org.jetbrains.kotlin.idea.formatter.kotlinCustomSettings import org.jetbrains.kotlin.idea.formatter.kotlinCustomSettings
import org.jetbrains.kotlin.psi.KtDestructuringDeclaration import org.jetbrains.kotlin.psi.KtDestructuringDeclaration
@@ -77,7 +83,9 @@ fun <T : PsiElement> T.needTrailingComma(
globalStartOffset: T.() -> Int? = PsiElement::startOffset, globalStartOffset: T.() -> Int? = PsiElement::startOffset,
globalEndOffset: T.() -> Int? = PsiElement::endOffset, globalEndOffset: T.() -> Int? = PsiElement::endOffset,
): Boolean { ): Boolean {
if (trailingComma() == null && !settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA || !additionalCheck()) return false if (trailingComma() == null && !settings.kotlinCustomSettings.addTrailingCommaIsAllowedFor(this)) return false
if (!additionalCheck()) return false
val startOffset = globalStartOffset() ?: return false val startOffset = globalStartOffset() ?: return false
val endOffset = globalEndOffset() ?: return false val endOffset = globalEndOffset() ?: return false
return containsLineBreakInThis(startOffset, endOffset) return containsLineBreakInThis(startOffset, endOffset)
@@ -86,4 +94,35 @@ fun <T : PsiElement> T.needTrailingComma(
fun PsiElement.containsLineBreakInThis(globalStartOffset: Int, globalEndOffset: Int): Boolean { fun PsiElement.containsLineBreakInThis(globalStartOffset: Int, globalEndOffset: Int): Boolean {
val textRange = TextRange.create(globalStartOffset, globalEndOffset).shiftLeft(startOffset) val textRange = TextRange.create(globalStartOffset, globalEndOffset).shiftLeft(startOffset)
return StringUtil.containsLineBreak(textRange.subSequence(text)) return StringUtil.containsLineBreak(textRange.subSequence(text))
} }
fun trailingCommaIsAllowedOnCallSite(): Boolean = Registry.`is`("kotlin.formatter.allowTrailingCommaOnCallSite")
private val TYPES_WITH_TRAILING_COMMA = TokenSet.create(
KtNodeTypes.TYPE_PARAMETER_LIST,
KtNodeTypes.DESTRUCTURING_DECLARATION,
KtNodeTypes.WHEN_ENTRY,
KtNodeTypes.FUNCTION_LITERAL,
KtNodeTypes.VALUE_PARAMETER_LIST,
)
private val TYPES_WITH_TRAILING_COMMA_ON_CALL_SITE = TokenSet.create(
KtNodeTypes.COLLECTION_LITERAL_EXPRESSION,
KtNodeTypes.TYPE_ARGUMENT_LIST,
KtNodeTypes.INDICES,
KtNodeTypes.VALUE_ARGUMENT_LIST,
)
fun UserDataHolder.addTrailingCommaIsAllowedForThis(): Boolean {
val type = when (this) {
is ASTNode -> PsiUtilCore.getElementType(this)
is PsiElement -> PsiUtilCore.getElementType(this)
else -> return false
}
return type in TYPES_WITH_TRAILING_COMMA || trailingCommaIsAllowedOnCallSite() && type in TYPES_WITH_TRAILING_COMMA_ON_CALL_SITE
}
fun KotlinCodeStyleSettings.addTrailingCommaIsAllowedFor(element: UserDataHolder): Boolean =
ALLOW_TRAILING_COMMA && element.addTrailingCommaIsAllowedForThis()
@@ -127,6 +127,10 @@
description="Allow a trailing comma regardless of plugin version" description="Allow a trailing comma regardless of plugin version"
defaultValue="false" defaultValue="false"
restartRequired="false"/> restartRequired="false"/>
<registryKey key="kotlin.formatter.allowTrailingCommaOnCallSite"
description="Allow a trailing comma on call-site"
defaultValue="false"
restartRequired="false"/>
<fileEditorProvider implementation="org.jetbrains.kotlin.idea.scratch.ui.KtScratchFileEditorProvider"/> <fileEditorProvider implementation="org.jetbrains.kotlin.idea.scratch.ui.KtScratchFileEditorProvider"/>
<moduleBuilder builderClass="org.jetbrains.kotlin.tools.projectWizard.wizard.NewProjectWizardModuleBuilder"/> <moduleBuilder builderClass="org.jetbrains.kotlin.tools.projectWizard.wizard.NewProjectWizardModuleBuilder"/>
@@ -23,10 +23,7 @@ import org.jetbrains.kotlin.idea.formatter.TrailingCommaPostFormatProcessor.Comp
import org.jetbrains.kotlin.idea.formatter.TrailingCommaPostFormatProcessor.Companion.trailingCommaAllowedInModule import org.jetbrains.kotlin.idea.formatter.TrailingCommaPostFormatProcessor.Companion.trailingCommaAllowedInModule
import org.jetbrains.kotlin.idea.formatter.TrailingCommaPostFormatProcessor.Companion.trailingCommaOrLastElement import org.jetbrains.kotlin.idea.formatter.TrailingCommaPostFormatProcessor.Companion.trailingCommaOrLastElement
import org.jetbrains.kotlin.idea.project.languageVersionSettings import org.jetbrains.kotlin.idea.project.languageVersionSettings
import org.jetbrains.kotlin.idea.util.isLineBreak import org.jetbrains.kotlin.idea.util.*
import org.jetbrains.kotlin.idea.util.isMultiline
import org.jetbrains.kotlin.idea.util.module
import org.jetbrains.kotlin.idea.util.needTrailingComma
import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.psiUtil.* import org.jetbrains.kotlin.psi.psiUtil.*
@@ -63,7 +60,8 @@ class TrailingCommaPostFormatProcessor : PostFormatProcessor {
else -> (checkExistingTrailingComma && else -> (checkExistingTrailingComma &&
trailingCommaOrLastElement(commaOwner)?.isComma == true || trailingCommaOrLastElement(commaOwner)?.isComma == true ||
settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA) && commaOwner.isMultiline() settings.kotlinCustomSettings.addTrailingCommaIsAllowedFor(commaOwner)) &&
commaOwner.isMultiline()
} }
fun trailingCommaOrLastElement(commaOwner: KtElement): PsiElement? { fun trailingCommaOrLastElement(commaOwner: KtElement): PsiElement? {
@@ -7,47 +7,48 @@ package org.jetbrains.kotlin.idea.formatter
import com.intellij.openapi.progress.ProgressIndicatorProvider import com.intellij.openapi.progress.ProgressIndicatorProvider
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.idea.util.addTrailingCommaIsAllowedForThis
import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.*
abstract class TrailingCommaVisitor : KtTreeVisitorVoid() { abstract class TrailingCommaVisitor : KtTreeVisitorVoid() {
override fun visitParameterList(list: KtParameterList) { override fun visitParameterList(list: KtParameterList) {
super.visitParameterList(list) super.visitParameterList(list)
process(list) runProcessIfAllowed(list)
} }
override fun visitValueArgumentList(list: KtValueArgumentList) { override fun visitValueArgumentList(list: KtValueArgumentList) {
super.visitValueArgumentList(list) super.visitValueArgumentList(list)
process(list) runProcessIfAllowed(list)
} }
override fun visitArrayAccessExpression(expression: KtArrayAccessExpression) { override fun visitArrayAccessExpression(expression: KtArrayAccessExpression) {
super.visitArrayAccessExpression(expression) super.visitArrayAccessExpression(expression)
process(expression.indicesNode) runProcessIfAllowed(expression.indicesNode)
} }
override fun visitTypeParameterList(list: KtTypeParameterList) { override fun visitTypeParameterList(list: KtTypeParameterList) {
super.visitTypeParameterList(list) super.visitTypeParameterList(list)
process(list) runProcessIfAllowed(list)
} }
override fun visitTypeArgumentList(typeArgumentList: KtTypeArgumentList) { override fun visitTypeArgumentList(typeArgumentList: KtTypeArgumentList) {
super.visitTypeArgumentList(typeArgumentList) super.visitTypeArgumentList(typeArgumentList)
process(typeArgumentList) runProcessIfAllowed(typeArgumentList)
} }
override fun visitCollectionLiteralExpression(expression: KtCollectionLiteralExpression) { override fun visitCollectionLiteralExpression(expression: KtCollectionLiteralExpression) {
super.visitCollectionLiteralExpression(expression) super.visitCollectionLiteralExpression(expression)
process(expression) runProcessIfAllowed(expression)
} }
override fun visitWhenEntry(jetWhenEntry: KtWhenEntry) { override fun visitWhenEntry(jetWhenEntry: KtWhenEntry) {
super.visitWhenEntry(jetWhenEntry) super.visitWhenEntry(jetWhenEntry)
process(jetWhenEntry) runProcessIfAllowed(jetWhenEntry)
} }
override fun visitDestructuringDeclaration(destructuringDeclaration: KtDestructuringDeclaration) { override fun visitDestructuringDeclaration(destructuringDeclaration: KtDestructuringDeclaration) {
super.visitDestructuringDeclaration(destructuringDeclaration) super.visitDestructuringDeclaration(destructuringDeclaration)
process(destructuringDeclaration) runProcessIfAllowed(destructuringDeclaration)
} }
override fun visitElement(element: PsiElement) { override fun visitElement(element: PsiElement) {
@@ -56,6 +57,12 @@ abstract class TrailingCommaVisitor : KtTreeVisitorVoid() {
if (recursively) super.visitElement(element) if (recursively) super.visitElement(element)
} }
private fun runProcessIfAllowed(element: KtElement) {
if (element.addTrailingCommaIsAllowedForThis()) {
process(element)
}
}
protected abstract fun process(commaOwner: KtElement) protected abstract fun process(commaOwner: KtElement)
protected open val recursively: Boolean = true protected open val recursively: Boolean = true
@@ -30,11 +30,9 @@ val x8 = foo!!!!!!!!.bar()
val x9 = ((b!!)!!!!)!!.f val x9 = ((b!!)!!!!)!!.f
val y = xyzzy( val y = xyzzy(foo.bar()
foo.bar() .baz()
.baz() .quux())
.quux(),
)
fun foo() { fun foo() {
foo.bar() foo.bar()
@@ -12,16 +12,12 @@ fun test() {
fun test1() { fun test1() {
val abc = ArrayList<Int>() val abc = ArrayList<Int>()
.map( .map({
{ it * 2
it * 2 })
}, .filter({
) it > 4
.filter( })
{
it > 4
},
)
} }
fun test2() { fun test2() {
@@ -39,7 +35,7 @@ fun test3() {
fun test4() { fun test4() {
val abc = ArrayList<Int>().mapTo( val abc = ArrayList<Int>().mapTo(
LinkedHashSet(), LinkedHashSet()
) { ) {
it * 2 it * 2
} }
@@ -3,7 +3,7 @@
@Anno([1]) @Anno([1])
fun a() = Unit fun a() = Unit
@Anno([1]) @Anno([1, ])
fun a() = Unit fun a() = Unit
@Anno([1 @Anno([1
@@ -22,7 +22,7 @@ fun a() = Unit
@Anno([1, 2]) @Anno([1, 2])
fun a() = Unit fun a() = Unit
@Anno([1, 2]) @Anno([1, 2, ])
fun a() = Unit fun a() = Unit
@Anno([1, 2 @Anno([1, 2
@@ -41,7 +41,7 @@ fun a() = Unit
@Anno([1, 2, 2]) @Anno([1, 2, 2])
fun a() = Unit fun a() = Unit
@Anno([1, 2, 2]) @Anno([1, 2, 2, ])
fun a() = Unit fun a() = Unit
@Anno(["1" @Anno(["1"
@@ -74,8 +74,8 @@ fun a() = Unit
/* /*
*/ */
// d // d
1,/* 1/*
*//* */,/*
*/ */
]) ])
fun a() = Unit fun a() = Unit
@@ -91,8 +91,8 @@ fun a() = Unit
@Anno([ @Anno([
1, 1,
2,/* 2/*
*//* */,/*
*/ */
]) ])
fun a() = Unit fun a() = Unit
@@ -3,182 +3,123 @@
@Anno([1]) @Anno([1])
fun a() = Unit fun a() = Unit
@Anno([1]) @Anno([1, ])
fun a() = Unit fun a() = Unit
@Anno( @Anno([1
[ ])
1,
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1,
1, ])
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1])
1,
],
)
fun a() = Unit fun a() = Unit
@Anno([1, 2]) @Anno([1, 2])
fun a() = Unit fun a() = Unit
@Anno([1, 2]) @Anno([1, 2, ])
fun a() = Unit fun a() = Unit
@Anno( @Anno([1, 2
[ ])
1, 2,
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1, 2,
1, 2, ])
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1, 2])
1, 2,
],
)
fun a() = Unit fun a() = Unit
@Anno([1, 2, 2]) @Anno([1, 2, 2])
fun a() = Unit fun a() = Unit
@Anno([1, 2, 2]) @Anno([1, 2, 2, ])
fun a() = Unit fun a() = Unit
@Anno( @Anno(["1"
[ ])
"1",
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1,
1, ])
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1, 2, 2])
1, 2, 2,
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([1/*
[ */])
1,/*
*/
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1, //dw
1, //dw ])
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([1 // ds
[ ])
1, // ds
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[
/* /*
*/ */
// d // d
1,/* 1/*
*//* */,/*
*/ */
], ])
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ /*
/* */ 1])
*/
1,
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([1/*
[ */, 2])
1,/* fun a() = Unit
@Anno([
1,
2/*
*/,/*
*/ */
2, ])
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([/*
[ */1, 2
1, ])
2,/*
*//*
*/
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno(["1"
[ ])
/*
*/
1, 2,
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1,
"1", ])
],
)
fun a() = Unit fun a() = Unit
@Anno( @Anno([
[ 1, 2 /*
1, */])
],
)
fun a() = Unit
@Anno(
[
1,
2, /*
*/
],
)
fun a() = Unit fun a() = Unit
@Component( @Component(
modules = [ modules = [
AppModule::class, DataModule::class, AppModule::class, DataModule::class,
DomainModule::class, DomainModule::class
], ],
) )
fun b() = Unit fun b() = Unit
@@ -0,0 +1,125 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
@Anno([1])
fun a() = Unit
@Anno([1])
fun a() = Unit
@Anno([1
])
fun a() = Unit
@Anno([
1,
])
fun a() = Unit
@Anno([
1])
fun a() = Unit
@Anno([1, 2])
fun a() = Unit
@Anno([1, 2])
fun a() = Unit
@Anno([1, 2
])
fun a() = Unit
@Anno([
1, 2,
])
fun a() = Unit
@Anno([
1, 2])
fun a() = Unit
@Anno([1, 2, 2])
fun a() = Unit
@Anno([1, 2, 2])
fun a() = Unit
@Anno(["1"
])
fun a() = Unit
@Anno([
1,
])
fun a() = Unit
@Anno([
1, 2, 2])
fun a() = Unit
@Anno([1/*
*/])
fun a() = Unit
@Anno([
1, //dw
])
fun a() = Unit
@Anno([1 // ds
])
fun a() = Unit
@Anno([
/*
*/
// d
1,/*
*//*
*/
])
fun a() = Unit
@Anno([
/*
*/ 1])
fun a() = Unit
@Anno([1/*
*/, 2])
fun a() = Unit
@Anno([
1,
2,/*
*//*
*/
])
fun a() = Unit
@Anno([/*
*/1, 2
])
fun a() = Unit
@Anno(["1"
])
fun a() = Unit
@Anno([
1,
])
fun a() = Unit
@Anno([
1, 2 /*
*/])
fun a() = Unit
@Component(
modules = [
AppModule::class, DataModule::class,
DomainModule::class
],
)
fun b() = Unit
@@ -0,0 +1,184 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
@Anno([1])
fun a() = Unit
@Anno([1])
fun a() = Unit
@Anno(
[
1,
],
)
fun a() = Unit
@Anno(
[
1,
],
)
fun a() = Unit
@Anno(
[
1,
],
)
fun a() = Unit
@Anno([1, 2])
fun a() = Unit
@Anno([1, 2])
fun a() = Unit
@Anno(
[
1, 2,
],
)
fun a() = Unit
@Anno(
[
1, 2,
],
)
fun a() = Unit
@Anno(
[
1, 2,
],
)
fun a() = Unit
@Anno([1, 2, 2])
fun a() = Unit
@Anno([1, 2, 2])
fun a() = Unit
@Anno(
[
"1",
],
)
fun a() = Unit
@Anno(
[
1,
],
)
fun a() = Unit
@Anno(
[
1, 2, 2,
],
)
fun a() = Unit
@Anno(
[
1,/*
*/
],
)
fun a() = Unit
@Anno(
[
1, //dw
],
)
fun a() = Unit
@Anno(
[
1, // ds
],
)
fun a() = Unit
@Anno(
[
/*
*/
// d
1,/*
*//*
*/
],
)
fun a() = Unit
@Anno(
[
/*
*/
1,
],
)
fun a() = Unit
@Anno(
[
1,/*
*/
2,
],
)
fun a() = Unit
@Anno(
[
1,
2,/*
*//*
*/
],
)
fun a() = Unit
@Anno(
[
/*
*/
1, 2,
],
)
fun a() = Unit
@Anno(
[
"1",
],
)
fun a() = Unit
@Anno(
[
1,
],
)
fun a() = Unit
@Anno(
[
1,
2, /*
*/
],
)
fun a() = Unit
@Component(
modules = [
AppModule::class, DataModule::class,
DomainModule::class,
],
)
fun b() = Unit
@@ -24,14 +24,14 @@ enum class Enum5 {
enum class Enum6(val a: Int) { enum class Enum6(val a: Int) {
A( A(
1, 1
), ),
B, B,
} }
enum class Enum7(val a: Int) { enum class Enum7(val a: Int) {
A( A(
1, 1
), ),
B, B,
; ;
@@ -39,7 +39,7 @@ enum class Enum7(val a: Int) {
enum class Enum8(val a: Int) { enum class Enum8(val a: Int) {
A( A(
1, 1
), ),
B; B;
} }
@@ -25,7 +25,7 @@ fun foo() {
foofoo foofoo
] ]
testtest[foofoo] testtest[foofoo, ]
testtest[foofoo, testtest[testtest[foofoo]]] testtest[foofoo, testtest[testtest[foofoo]]]
@@ -34,9 +34,9 @@ fun foo() {
testtest[testtest[foofoo]], testtest[testtest[foofoo]],
] ]
testtest[foofoo, testtest[testtest[foofoo]], testsa] testtest[foofoo, testtest[testtest[foofoo, ]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa] testtest[foofoo, seee, testtest[testtest[foofoo, ]], testsa]
useCallable["A", Callable { println["Hello world"] }] useCallable["A", Callable { println["Hello world"] }]
@@ -48,7 +48,7 @@ fun foo() {
useCallable[Callable { println["Hello world"] }] useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }] useCallable[Callable { println["Hello world"] }, ]
useCallable[ useCallable[
Callable { Callable {
@@ -76,7 +76,7 @@ fun foo() {
useCallable[{ println["Hello world"] }] useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }] useCallable[{ println["Hello world"] }, ]
useCallable[ useCallable[
{ println["Hello world"] }, { println["Hello world"] },
@@ -104,7 +104,7 @@ fun foo() {
override fun call() { override fun call() {
println["Hello world"] println["Hello world"]
} }
}, foo[0]] }, foo[0, ]]
useCallable[object : Callable<Unit> { useCallable[object : Callable<Unit> {
override fun call() { override fun call() {
@@ -112,13 +112,11 @@ fun foo() {
} }
}] }]
useCallable[ useCallable[object : Callable<Unit> {
object : Callable<Unit> { override fun call() {
override fun call() { println["Hello world"]
println["Hello world"] }
} }, ]
},
]
useCallable[object : Callable<Unit> { useCallable[object : Callable<Unit> {
override fun call() { override fun call() {
@@ -173,7 +171,7 @@ fun foo() {
foofoo foofoo
] ]
testtest[foofoo/**/] testtest[foofoo,/**/]
testtest[foofoo, foofoo, foofoo, foofoo/* testtest[foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar */, /* */ bar
@@ -186,7 +184,7 @@ fun foo() {
foofoo foofoo
] ]
testtest[foofoo/**/] testtest[foofoo,/**/]
testtest[ testtest[
foofoo, fososos,/* foofoo, fososos,/*
@@ -194,16 +192,16 @@ fun foo() {
testtest[testtest[foofoo]], testtest[testtest[foofoo]],
] ]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa] testtest[foofoo, testtest[testtest[foofoo, ]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa] testtest[foofoo, testtest[testtest[foofoo, ]]/* */, /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* testtest[foofoo, testtest[testtest[foofoo, ]]/*
*/, testsa] */, testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa] testtest[foofoo, seee, testtest[testtest[foofoo, ]], /**/testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /* testtest[foofoo, seee, testtest[testtest[foofoo, ]], /*
*/testsa] */testsa]
useCallable["B", "C", Callable { useCallable["B", "C", Callable {
@@ -1,37 +1,31 @@
// SET_TRUE: ALLOW_TRAILING_COMMA // SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() { fun foo() {
testtest[foofoo, foofoo, foofoo,
foofoo, bar]
testtest[ testtest[
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, bar
foofoo, bar, ]
testtest[foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo,
bar
]
testtest[foofoo
] ]
testtest[ testtest[
foofoo, foofoo, foofoo, foofoo, bar, foofoo]
]
testtest[ testtest[
foofoo, foofoo, foofoo, foofoo, bar, foofoo
] ]
testtest[ testtest[foofoo, ]
foofoo, foofoo, foofoo, foofoo,
bar,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]] testtest[foofoo, testtest[testtest[foofoo]]]
@@ -40,25 +34,21 @@ fun foo() {
testtest[testtest[foofoo]], testtest[testtest[foofoo]],
] ]
testtest[foofoo, testtest[testtest[foofoo]], testsa] testtest[foofoo, testtest[testtest[foofoo, ]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa] testtest[foofoo, seee, testtest[testtest[foofoo, ]], testsa]
useCallable["A", Callable { println["Hello world"] }] useCallable["A", Callable { println["Hello world"] }]
useCallable[ useCallable["B", "C", Callable {
"B", "C", println["Hello world"]
Callable { }, Callable {
println["Hello world"] println["Hello world"]
}, }]
Callable {
println["Hello world"]
},
]
useCallable[Callable { println["Hello world"] }] useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }] useCallable[Callable { println["Hello world"] }, ]
useCallable[ useCallable[
Callable { Callable {
@@ -66,8 +56,7 @@ fun foo() {
}, },
] ]
useCallable[ useCallable[Callable { println["Hello world"] }
Callable { println["Hello world"] },
] ]
useCallable[Callable { println["Hello world"] }]{ useCallable[Callable { println["Hello world"] }]{
@@ -75,96 +64,72 @@ fun foo() {
} }
useCallable[ useCallable[
Callable { println["Hello world"] }, Callable { println["Hello world"] }]
]
useCallable["A", { println["Hello world"] }] useCallable["A", { println["Hello world"] }]
useCallable[ useCallable["B", "C", {
"B", "C", println["Hello world"]
{ }, {
println["Hello world"] println["Hello world"]
}, }]
{
println["Hello world"]
},
]
useCallable[{ println["Hello world"] }] useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }] useCallable[{ println["Hello world"] }, ]
useCallable[ useCallable[
{ println["Hello world"] }, { println["Hello world"] },
] ]
useCallable[ useCallable[{ println["Hello world"] }
{ println["Hello world"] },
] ]
useCallable[ useCallable[
{ println["Hello world"] }, { println["Hello world"] }]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["B", "C", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, foo[0, ]]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, ]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}
] ]
useCallable[ useCallable[object : Callable<Unit> {
"A", override fun call() {
object : Callable<Unit> { println["Hello world"]
override fun call() { }
println["Hello world"] }] {
}
},
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"B", "C",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
foo[0],
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
] {
} }
@@ -173,70 +138,53 @@ fun foo() {
override fun call() { override fun call() {
println["Hello world"] println["Hello world"]
} }
}, }]
]
testtest[ testtest[
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo,
bar, /* bar /*
*/ /* */ */, /* */ foo
foo,
] ]
testtest[ testtest[/*
/* */foofoo, foofoo, foofoo, /*
*/
foofoo, foofoo, foofoo, /*
*/ */
foofoo, bar, foofoo, bar]
testtest[foofoo, foofoo, foofoo, foofoo, bar/*
*/]
testtest[foofoo, foofoo, foofoo, foofoo, bar // awdawda
] ]
testtest[ testtest[foofoo, foofoo, foofoo, foofoo, /*
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
]
testtest[
foofoo, foofoo, foofoo, foofoo, /*
*/ */
bar, bar
] ]
testtest[ testtest[foofoo // fd
foofoo, // fd
] ]
testtest[ testtest[ /**/
/**/ foofoo
foofoo,
] ]
testtest[foofoo/**/] testtest[foofoo,/**/]
testtest[ testtest[foofoo, foofoo, foofoo, foofoo/*
foofoo, foofoo, foofoo, */, /* */ bar
foofoo,/*
*/ /* */
bar,
] ]
testtest[ testtest[foofoo // fd
foofoo, // fd
] ]
testtest[ testtest[ /**/
/**/ foofoo
foofoo,
] ]
testtest[foofoo/**/] testtest[foofoo,/**/]
testtest[ testtest[
foofoo, fososos,/* foofoo, fososos,/*
@@ -244,36 +192,24 @@ fun foo() {
testtest[testtest[foofoo]], testtest[testtest[foofoo]],
] ]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa] testtest[foofoo, testtest[testtest[foofoo, ]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa] testtest[foofoo, testtest[testtest[foofoo, ]]/* */, /**/testsa]
testtest[ testtest[foofoo, testtest[testtest[foofoo, ]]/*
foofoo, */, testsa]
testtest[testtest[foofoo]],/*
*/
testsa,
]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa] testtest[foofoo, seee, testtest[testtest[foofoo, ]], /**/testsa]
testtest[ testtest[foofoo, seee, testtest[testtest[foofoo, ]], /*
foofoo, seee, testtest[testtest[foofoo]], /* */testsa]
*/
testsa,
]
useCallable[ useCallable["B", "C", Callable {
"B", "C", println["Hello world"]
Callable { }, /* */ Callable {
println["Hello world"] println["Hello world"]
}, /* */ }]
Callable {
println["Hello world"]
},
]
useCallable[ useCallable[Callable { println["Hello world"] } // ffd
Callable { println["Hello world"] }, // ffd
] ]
} }
@@ -0,0 +1,217 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest[foofoo, foofoo, foofoo,
foofoo, bar]
testtest[
foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo,
bar
]
testtest[foofoo
]
testtest[
foofoo]
testtest[
foofoo
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]]
testtest[
foofoo, fososos,
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
useCallable["A", Callable { println["Hello world"] }]
useCallable["B", "C", Callable {
println["Hello world"]
}, Callable {
println["Hello world"]
}]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[
Callable {
println["Hello world"]
},
]
useCallable[Callable { println["Hello world"] }
]
useCallable[Callable { println["Hello world"] }]{
}
useCallable[
Callable { println["Hello world"] }]
useCallable["A", { println["Hello world"] }]
useCallable["B", "C", {
println["Hello world"]
}, {
println["Hello world"]
}]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[
{ println["Hello world"] },
]
useCallable[{ println["Hello world"] }
]
useCallable[
{ println["Hello world"] }]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["B", "C", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, foo[0]]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}
]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}] {
}
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar /*
*/, /* */ foo
]
testtest[/*
*/foofoo, foofoo, foofoo, /*
*/
foofoo, bar]
testtest[foofoo, foofoo, foofoo, foofoo, bar/*
*/]
testtest[foofoo, foofoo, foofoo, foofoo, bar // awdawda
]
testtest[foofoo, foofoo, foofoo, foofoo, /*
*/
bar
]
testtest[foofoo // fd
]
testtest[ /**/
foofoo
]
testtest[foofoo/**/]
testtest[foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
]
testtest[foofoo // fd
]
testtest[ /**/
foofoo
]
testtest[foofoo/**/]
testtest[
foofoo, fososos,/*
*/
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/*
*/, testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /*
*/testsa]
useCallable["B", "C", Callable {
println["Hello world"]
}, /* */ Callable {
println["Hello world"]
}]
useCallable[Callable { println["Hello world"] } // ffd
]
}
@@ -0,0 +1,279 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest[
foofoo, foofoo, foofoo,
foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]]
testtest[
foofoo, fososos,
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
useCallable["A", Callable { println["Hello world"] }]
useCallable[
"B", "C",
Callable {
println["Hello world"]
},
Callable {
println["Hello world"]
},
]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[
Callable {
println["Hello world"]
},
]
useCallable[
Callable { println["Hello world"] },
]
useCallable[Callable { println["Hello world"] }]{
}
useCallable[
Callable { println["Hello world"] },
]
useCallable["A", { println["Hello world"] }]
useCallable[
"B", "C",
{
println["Hello world"]
},
{
println["Hello world"]
},
]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[
{ println["Hello world"] },
]
useCallable[
{ println["Hello world"] },
]
useCallable[
{ println["Hello world"] },
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"B", "C",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
foo[0],
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
] {
}
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar, /*
*/ /* */
foo,
]
testtest[
/*
*/
foofoo, foofoo, foofoo, /*
*/
foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
]
testtest[
foofoo, foofoo, foofoo, foofoo, /*
*/
bar,
]
testtest[
foofoo, // fd
]
testtest[
/**/
foofoo,
]
testtest[foofoo/**/]
testtest[
foofoo, foofoo, foofoo,
foofoo,/*
*/ /* */
bar,
]
testtest[
foofoo, // fd
]
testtest[
/**/
foofoo,
]
testtest[foofoo/**/]
testtest[
foofoo, fososos,/*
*/
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa]
testtest[
foofoo,
testtest[testtest[foofoo]],/*
*/
testsa,
]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[
foofoo, seee, testtest[testtest[foofoo]], /*
*/
testsa,
]
useCallable[
"B", "C",
Callable {
println["Hello world"]
}, /* */
Callable {
println["Hello world"]
},
]
useCallable[
Callable { println["Hello world"] }, // ffd
]
}
@@ -0,0 +1,188 @@
val x = {
x: Comparable<Comparable<Number>>,
y: String,
->
println("1")
}
val x = { x: Comparable<Comparable<Number>>, y: String ->
println("1")
}
val x = { x: String, y
: String ->
println("1")
}
val x = { x: String,
y: String
->
println("1")
}
val x = {
x: String,
y: Comparable<Comparable<Number>>,
->
println("1")
}
val x = {
x: Comparable<Comparable<Number>>,
y: String,
->
println("1")
}
val x = {
x: String,
y: Comparable<Comparable<Number>>,
z: String,
->
println("1")
}
val x = { x: String,
y: String,
z: String
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
->
println("1")
}
val x = { x: String
->
println("1")
}
val x = { x: String ->
println("1")
}
val x = {
x: String,
->
println("1")
}
val x = {
x: String,
y: String,
->
println("1")
}
val x = { x: String,
z: String
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
z: String,
->
println("1")
}
val x = {
x, y: String,
z: String,
->
println("1")
}
val x = { x: String, y: String, z: String
->
println("1")
}
val x = {
z: String, v: Comparable<Comparable<Number>>,
->
println("1")
}
val x = {
x: String,
y: Comparable<Comparable<Number>>,
->
println("1")
}
val x = { x: Int
->
println("1")
}
val x = { x: String, y: String, /* */ z: String
->
println("1")
}
val x = { x: String, y: String
/* */, /* */ z: String
->
println("1")
}()
val x = {
x: String, /*
*/
y: String,
z: String,
->
println("1")
}
val x = {
x: String, y: String,
z: String, /*
*/
->
println("1")
}
val x = {
x: Comparable<Comparable<Number>>, y: String,
z: String,
->
println("1")
}
val x = { x: String, y: String, z: String
->
println("1")
}
// SET_TRUE: ALLOW_TRAILING_COMMA
@@ -0,0 +1,203 @@
val x = {
x: Comparable<Comparable<Number>>,
y: String,
->
println("1")
}
val x = { x: Comparable<Comparable<Number>>, y: String ->
println("1")
}
val x = {
x: String,
y
: String,
->
println("1")
}
val x = {
x: String,
y: String,
->
println("1")
}
val x = {
x: String,
y: Comparable<Comparable<Number>>,
->
println("1")
}
val x = {
x: Comparable<Comparable<Number>>,
y: String,
->
println("1")
}
val x = {
x: String,
y: Comparable<Comparable<Number>>,
z: String,
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
->
println("1")
}
val x = {
x: String,
->
println("1")
}
val x = { x: String ->
println("1")
}
val x = {
x: String,
->
println("1")
}
val x = {
x: String,
y: String,
->
println("1")
}
val x = {
x: String,
z: String,
->
println("1")
}
val x = {
x: String,
y: String,
z: String,
->
println("1")
}
val x = {
x: String,
z: String,
->
println("1")
}
val x = {
x, y: String,
z: String,
->
println("1")
}
val x = {
x: String, y: String, z: String,
->
println("1")
}
val x = {
z: String, v: Comparable<Comparable<Number>>,
->
println("1")
}
val x = {
x: String,
y: Comparable<Comparable<Number>>,
->
println("1")
}
val x = {
x: Int,
->
println("1")
}
val x = {
x: String, y: String, /* */
z: String,
->
println("1")
}
val x = {
x: String,
y: String,
/* */ /* */
z: String,
->
println("1")
}()
val x = {
x: String, /*
*/
y: String,
z: String,
->
println("1")
}
val x = {
x: String, y: String,
z: String, /*
*/
->
println("1")
}
val x = {
x: Comparable<Comparable<Number>>, y: String,
z: String,
->
println("1")
}
val x = {
x: String, y: String, z: String,
->
println("1")
}
// SET_TRUE: ALLOW_TRAILING_COMMA
@@ -35,19 +35,19 @@ fun foo() {
foofoo foofoo
>() >()
testtest<foofoo>() testtest<foofoo, >()
testtest<foofoo, testtest<testtest<foofoo>>>() testtest<foofoo, testtest<testtest<foofoo>>>()
testtest<foofoo, fososos, testtest<testtest<foofoo>>>() testtest<foofoo, fososos, testtest<testtest<foofoo>>, >()
testtest< testtest<
foofoo, fososos, testtest<testtest<foofoo>>, foofoo, fososos, testtest<testtest<foofoo>>,
>() >()
testtest<foofoo, testtest<testtest<foofoo>>, testsa>() testtest<foofoo, testtest<testtest<foofoo, >>, testsa>()
testtest<foofoo, *, testtest<testtest<foofoo>>, testsa>() testtest<foofoo, *, testtest<testtest<foofoo, >>, testsa>()
testtest< testtest<
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo,
@@ -80,7 +80,7 @@ fun foo() {
foofoo foofoo
>() >()
testtest<foofoo/**/>() testtest<foofoo,/**/>()
testtest<foofoo, foofoo, foofoo, foofoo/* testtest<foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar */, /* */ bar
@@ -93,7 +93,7 @@ fun foo() {
foofoo foofoo
>() >()
testtest<foofoo/**/>() testtest<foofoo,/**/>()
testtest< testtest<
foofoo,/* foofoo,/*
@@ -110,15 +110,15 @@ fun foo() {
testtest<testtest<foofoo>>, testtest<testtest<foofoo>>,
>() >()
testtest<foofoo, testtest<testtest<foofoo>>, /**/testsa>() testtest<foofoo, testtest<testtest<foofoo, >>, /**/testsa>()
testtest<foofoo, testtest<testtest<foofoo>>/* */, /**/testsa>() testtest<foofoo, testtest<testtest<foofoo, >>/* */, /**/testsa>()
testtest<foofoo, testtest<testtest<foofoo>>/* testtest<foofoo, testtest<testtest<foofoo, >>/*
*/, testsa>() */, testsa>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /**/testsa>() testtest<foofoo, seee, testtest<testtest<foofoo, >>, /**/testsa>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /* testtest<foofoo, seee, testtest<testtest<foofoo, >>, /*
*/testsa>() */testsa>()
} }
@@ -11,111 +11,89 @@ fun foo() {
testsa, testsa,
>() >()
testtest<foofoo, foofoo, foofoo,
foofoo, bar>()
testtest< testtest<
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, bar
foofoo, bar, >()
testtest<foofoo, foofoo, foofoo, foofoo, bar
>()
testtest<foofoo, foofoo, foofoo, foofoo,
bar
>()
testtest<foofoo
>() >()
testtest< testtest<
foofoo, foofoo, foofoo, foofoo, bar, foofoo>()
>()
testtest< testtest<
foofoo, foofoo, foofoo, foofoo, bar, foofoo
>() >()
testtest< testtest<foofoo, >()
foofoo, foofoo, foofoo, foofoo,
bar,
>()
testtest<
foofoo,
>()
testtest<
foofoo,
>()
testtest<
foofoo,
>()
testtest<foofoo>()
testtest<foofoo, testtest<testtest<foofoo>>>() testtest<foofoo, testtest<testtest<foofoo>>>()
testtest<foofoo, fososos, testtest<testtest<foofoo>>>() testtest<foofoo, fososos, testtest<testtest<foofoo>>, >()
testtest< testtest<
foofoo, fososos, testtest<testtest<foofoo>>, foofoo, fososos, testtest<testtest<foofoo>>,
>() >()
testtest<foofoo, testtest<testtest<foofoo>>, testsa>() testtest<foofoo, testtest<testtest<foofoo, >>, testsa>()
testtest<foofoo, *, testtest<testtest<foofoo>>, testsa>() testtest<foofoo, *, testtest<testtest<foofoo, >>, testsa>()
testtest< testtest<
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo,
bar, /* bar /*
*/ /* */ */, /* */ foo
foo,
>() >()
testtest< testtest</*
/* */foofoo, foofoo, foofoo, /*
*/
foofoo, foofoo, foofoo, /*
*/ */
foofoo, bar, foofoo, bar>()
testtest<foofoo, foofoo, foofoo, foofoo, bar/*
*/>()
testtest<foofoo, foofoo, foofoo, foofoo, bar // awdawda
>() >()
testtest< testtest<foofoo, foofoo, foofoo, foofoo, /*
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
>()
testtest<
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
>()
testtest<
foofoo, foofoo, foofoo, foofoo, /*
*/ */
bar, bar
>() >()
testtest< testtest<foofoo // fd
foofoo, // fd
>() >()
testtest< testtest< /**/
/**/ foofoo
foofoo,
>() >()
testtest<foofoo/**/>() testtest<foofoo,/**/>()
testtest< testtest<foofoo, foofoo, foofoo, foofoo/*
foofoo, foofoo, foofoo, */, /* */ bar
foofoo,/*
*/ /* */
bar,
>() >()
testtest< testtest<foofoo // fd
foofoo, // fd
>() >()
testtest< testtest< /**/
/**/ foofoo
foofoo,
>() >()
testtest<foofoo/**/>() testtest<foofoo,/**/>()
testtest< testtest<
foofoo,/* foofoo,/*
@@ -132,22 +110,15 @@ fun foo() {
testtest<testtest<foofoo>>, testtest<testtest<foofoo>>,
>() >()
testtest<foofoo, testtest<testtest<foofoo>>, /**/testsa>() testtest<foofoo, testtest<testtest<foofoo, >>, /**/testsa>()
testtest<foofoo, testtest<testtest<foofoo>>/* */, /**/testsa>() testtest<foofoo, testtest<testtest<foofoo, >>/* */, /**/testsa>()
testtest< testtest<foofoo, testtest<testtest<foofoo, >>/*
foofoo, */, testsa>()
testtest<testtest<foofoo>>,/*
*/
testsa,
>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /**/testsa>() testtest<foofoo, seee, testtest<testtest<foofoo, >>, /**/testsa>()
testtest< testtest<foofoo, seee, testtest<testtest<foofoo, >>, /*
foofoo, seee, testtest<testtest<foofoo>>, /* */testsa>()
*/
testsa,
>()
} }
@@ -0,0 +1,124 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest<
foofoo,
testtest<
testtest<
foofoo,
>,
>,
testsa,
>()
testtest<foofoo, foofoo, foofoo,
foofoo, bar>()
testtest<
foofoo, foofoo, foofoo, foofoo, bar
>()
testtest<foofoo, foofoo, foofoo, foofoo, bar
>()
testtest<foofoo, foofoo, foofoo, foofoo,
bar
>()
testtest<foofoo
>()
testtest<
foofoo>()
testtest<
foofoo
>()
testtest<foofoo>()
testtest<foofoo, testtest<testtest<foofoo>>>()
testtest<foofoo, fososos, testtest<testtest<foofoo>>>()
testtest<
foofoo, fososos, testtest<testtest<foofoo>>,
>()
testtest<foofoo, testtest<testtest<foofoo>>, testsa>()
testtest<foofoo, *, testtest<testtest<foofoo>>, testsa>()
testtest<
foofoo, foofoo, foofoo, foofoo,
bar /*
*/, /* */ foo
>()
testtest</*
*/foofoo, foofoo, foofoo, /*
*/
foofoo, bar>()
testtest<foofoo, foofoo, foofoo, foofoo, bar/*
*/>()
testtest<foofoo, foofoo, foofoo, foofoo, bar // awdawda
>()
testtest<foofoo, foofoo, foofoo, foofoo, /*
*/
bar
>()
testtest<foofoo // fd
>()
testtest< /**/
foofoo
>()
testtest<foofoo/**/>()
testtest<foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
>()
testtest<foofoo // fd
>()
testtest< /**/
foofoo
>()
testtest<foofoo/**/>()
testtest<
foofoo,/*
*/
>()
testtest<
foofoo,/**/
>()
testtest<
foofoo, fososos,/*
*/
testtest<testtest<foofoo>>,
>()
testtest<foofoo, testtest<testtest<foofoo>>, /**/testsa>()
testtest<foofoo, testtest<testtest<foofoo>>/* */, /**/testsa>()
testtest<foofoo, testtest<testtest<foofoo>>/*
*/, testsa>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /**/testsa>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /*
*/testsa>()
}
@@ -0,0 +1,153 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest<
foofoo,
testtest<
testtest<
foofoo,
>,
>,
testsa,
>()
testtest<
foofoo, foofoo, foofoo,
foofoo, bar,
>()
testtest<
foofoo, foofoo, foofoo, foofoo, bar,
>()
testtest<
foofoo, foofoo, foofoo, foofoo, bar,
>()
testtest<
foofoo, foofoo, foofoo, foofoo,
bar,
>()
testtest<
foofoo,
>()
testtest<
foofoo,
>()
testtest<
foofoo,
>()
testtest<foofoo>()
testtest<foofoo, testtest<testtest<foofoo>>>()
testtest<foofoo, fososos, testtest<testtest<foofoo>>>()
testtest<
foofoo, fososos, testtest<testtest<foofoo>>,
>()
testtest<foofoo, testtest<testtest<foofoo>>, testsa>()
testtest<foofoo, *, testtest<testtest<foofoo>>, testsa>()
testtest<
foofoo, foofoo, foofoo, foofoo,
bar, /*
*/ /* */
foo,
>()
testtest<
/*
*/
foofoo, foofoo, foofoo, /*
*/
foofoo, bar,
>()
testtest<
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
>()
testtest<
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
>()
testtest<
foofoo, foofoo, foofoo, foofoo, /*
*/
bar,
>()
testtest<
foofoo, // fd
>()
testtest<
/**/
foofoo,
>()
testtest<foofoo/**/>()
testtest<
foofoo, foofoo, foofoo,
foofoo,/*
*/ /* */
bar,
>()
testtest<
foofoo, // fd
>()
testtest<
/**/
foofoo,
>()
testtest<foofoo/**/>()
testtest<
foofoo,/*
*/
>()
testtest<
foofoo,/**/
>()
testtest<
foofoo, fososos,/*
*/
testtest<testtest<foofoo>>,
>()
testtest<foofoo, testtest<testtest<foofoo>>, /**/testsa>()
testtest<foofoo, testtest<testtest<foofoo>>/* */, /**/testsa>()
testtest<
foofoo,
testtest<testtest<foofoo>>,/*
*/
testsa,
>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /**/testsa>()
testtest<
foofoo, seee, testtest<testtest<foofoo>>, /*
*/
testsa,
>()
}
@@ -0,0 +1,278 @@
class A1<
x : String,
y : String,
>
class F<x : String, y : String>
class F2<x : String, y
: String>
class B1<
x : String,
y : String
>
class C1<
x : String,
y : String,
>
class D1<
x : String,
y : String,
>
class A2<
x : String,
y : String,
z : String,
>
class B2<
x : String,
y : String,
z : String
>
class C2<
x : String,
y : String,
z : String,
>
class D2<
x : String,
y : String,
z : String,
>
class A3<
x : String,
>
class B3<
x : String
>
class C3<
x : String,
>
class D3<
x : String,
>
class A4<
x : String,
y : String,
z,
>
class B4<
x : String,
y,
z : String
>
class C4<
x : String,
y : String,
z : String,
>
class D4<
x : String,
y,
z : String,
>
class E1<
x, y : String,
z : String,
>
class E2<
x : String, y : String, z : String
>
class C<
z : String, v
>
fun <
x : String,
y : String,
> a1() = Unit
fun <x : String,
y : String
> b1() = Unit
fun <
x : String,
y : String,
> c1() = Unit
fun <
x : String,
y : String,
> d1() = Unit
fun <
x : String,
y : String,
z : String,
> a2() = Unit
fun <
x : String,
y : String,
z : String
> b2() = Unit
fun <
x : String,
y : String,
z : String,
> c2() = Unit
fun <
x : String,
y : String,
z : String,
> d2() = Unit
fun <
x : String,
> a3() = Unit
fun <
x : String
> b3() = Unit
fun <
x : String,
> c3() = Unit
fun <
x : String,
> d3() = Unit
fun <
x : String,
y : String,
z : String,
> a4() = Unit
fun <
x : String,
y : String,
z : String
> b4() = Unit
fun <
x : String,
y : String,
z : String,
> c4() = Unit
fun <
x : String,
y : String,
z : String,
> d4() = Unit
fun <
x
> foo() {
}
fun <T> ag() {
}
fun <T> ag() {
}
fun <
T> ag() {
}
class C<
x : Int
>
class G<
x : String, y : String, /* */ z : String
>
class G<
x : String, y : String
/* */, /* */ z : String
>()
class H<
x : String, /*
*/
y : String,
z : String,
>
class J<
x : String, y : String,
z : String, /*
*/
>
class K<
x : String, y : String,
z : String,
>
class L<
x : String, y : String, z : String
>
class C<
x : Int // adad
>
class G<
x : String, y : String, /* */ z : String // adad
>
class G<
x : String,
y : String,
/* */ /* */
z : String, /**/
>()
class H<
x : String, /*
*/
y : String,
z : String, /*
*/
>
class J<
x : String, y : String,
z : String, /*
*/ /**/
>
class K<
x : String, y : String,
z : String, // aw
>
class L<
x : String, y : String, z : String //awd
>
// SET_TRUE: ALLOW_TRAILING_COMMA
@@ -0,0 +1,287 @@
class A1<
x : String,
y : String,
>
class F<x : String, y : String>
class F2<
x : String,
y
: String,
>
class B1<
x : String,
y : String,
>
class C1<
x : String,
y : String,
>
class D1<
x : String,
y : String,
>
class A2<
x : String,
y : String,
z : String,
>
class B2<
x : String,
y : String,
z : String,
>
class C2<
x : String,
y : String,
z : String,
>
class D2<
x : String,
y : String,
z : String,
>
class A3<
x : String,
>
class B3<
x : String,
>
class C3<
x : String,
>
class D3<
x : String,
>
class A4<
x : String,
y : String,
z,
>
class B4<
x : String,
y,
z : String,
>
class C4<
x : String,
y : String,
z : String,
>
class D4<
x : String,
y,
z : String,
>
class E1<
x, y : String,
z : String,
>
class E2<
x : String, y : String, z : String,
>
class C<
z : String, v,
>
fun <
x : String,
y : String,
> a1() = Unit
fun <
x : String,
y : String,
> b1() = Unit
fun <
x : String,
y : String,
> c1() = Unit
fun <
x : String,
y : String,
> d1() = Unit
fun <
x : String,
y : String,
z : String,
> a2() = Unit
fun <
x : String,
y : String,
z : String,
> b2() = Unit
fun <
x : String,
y : String,
z : String,
> c2() = Unit
fun <
x : String,
y : String,
z : String,
> d2() = Unit
fun <
x : String,
> a3() = Unit
fun <
x : String,
> b3() = Unit
fun <
x : String,
> c3() = Unit
fun <
x : String,
> d3() = Unit
fun <
x : String,
y : String,
z : String,
> a4() = Unit
fun <
x : String,
y : String,
z : String,
> b4() = Unit
fun <
x : String,
y : String,
z : String,
> c4() = Unit
fun <
x : String,
y : String,
z : String,
> d4() = Unit
fun <
x,
> foo() {
}
fun <T> ag() {
}
fun <T> ag() {
}
fun <
T,
> ag() {
}
class C<
x : Int,
>
class G<
x : String, y : String, /* */
z : String,
>
class G<
x : String,
y : String,
/* */ /* */
z : String,
>()
class H<
x : String, /*
*/
y : String,
z : String,
>
class J<
x : String, y : String,
z : String, /*
*/
>
class K<
x : String, y : String,
z : String,
>
class L<
x : String, y : String, z : String,
>
class C<
x : Int, // adad
>
class G<
x : String, y : String, /* */
z : String, // adad
>
class G<
x : String,
y : String,
/* */ /* */
z : String, /**/
>()
class H<
x : String, /*
*/
y : String,
z : String, /*
*/
>
class J<
x : String, y : String,
z : String, /*
*/ /**/
>
class K<
x : String, y : String,
z : String, // aw
>
class L<
x : String, y : String, z : String, //awd
>
// SET_TRUE: ALLOW_TRAILING_COMMA
@@ -26,15 +26,15 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo) testtest(foofoo, )
testtest(foofoo, testtest(testtest(foofoo))) testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo))) testtest(foofoo, fososos, testtest(testtest(foofoo)), )
testtest(foofoo, testtest(testtest(foofoo)), testsa) testtest(foofoo, testtest(testtest(foofoo, )), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), testsa)
useCallable("A", Callable { println("Hello world") }) useCallable("A", Callable { println("Hello world") })
@@ -46,7 +46,7 @@ fun foo() {
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable(Callable { println("Hello world") } useCallable(Callable { println("Hello world") }
) )
@@ -68,7 +68,7 @@ fun foo() {
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable({ println("Hello world") } useCallable({ println("Hello world") }
) )
@@ -90,7 +90,7 @@ fun foo() {
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable(foo() { println("Hello world") } useCallable(foo() { println("Hello world") }
) )
@@ -128,13 +128,11 @@ fun foo() {
} }
}) })
useCallable( useCallable(object : Callable<Unit> {
object : Callable<Unit> { override fun call() {
override fun call() { println("Hello world")
println("Hello world") }
} }, )
},
)
useCallable(object : Callable<Unit> { useCallable(object : Callable<Unit> {
override fun call() { override fun call() {
@@ -189,7 +187,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest(foofoo, foofoo, foofoo, foofoo/* testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar */, /* */ bar
@@ -202,7 +200,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, fososos,/* foofoo, fososos,/*
@@ -210,16 +208,16 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa) testtest(foofoo, testtest(testtest(foofoo, ))/* */, /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* testtest(foofoo, testtest(testtest(foofoo, ))/*
*/, testsa) */, testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /* testtest(foofoo, seee, testtest(testtest(foofoo, )), /*
*/testsa) */testsa)
useCallable("B", "C", Callable { useCallable("B", "C", Callable {
@@ -267,9 +265,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -2,64 +2,53 @@
// SET_TRUE: ALLOW_TRAILING_COMMA // SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() { fun foo() {
testtest(foofoo, foofoo, foofoo,
foofoo, bar)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, bar
foofoo, bar, )
testtest(foofoo, foofoo, foofoo, foofoo, bar
)
testtest(foofoo, foofoo, foofoo, foofoo,
bar
)
testtest(foofoo
) )
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, bar, foofoo)
)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, bar, foofoo
) )
testtest( testtest(foofoo, )
foofoo, foofoo, foofoo, foofoo,
bar,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(foofoo, testtest(testtest(foofoo))) testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo))) testtest(foofoo, fososos, testtest(testtest(foofoo)), )
testtest(foofoo, testtest(testtest(foofoo)), testsa) testtest(foofoo, testtest(testtest(foofoo, )), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), testsa)
useCallable("A", Callable { println("Hello world") }) useCallable("A", Callable { println("Hello world") })
useCallable( useCallable("B", "C", Callable {
"B", "C", println("Hello world")
Callable { }, Callable {
println("Hello world") println("Hello world")
}, })
Callable {
println("Hello world")
},
)
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable( useCallable(Callable { println("Hello world") }
Callable { println("Hello world") },
) )
useCallable(Callable { println("Hello world") }) { useCallable(Callable { println("Hello world") }) {
@@ -67,27 +56,21 @@ fun foo() {
} }
useCallable( useCallable(
Callable { println("Hello world") }, Callable { println("Hello world") })
)
useCallable("A", { println("Hello world") }) useCallable("A", { println("Hello world") })
useCallable( useCallable("B", "C", {
"B", "C", println("Hello world")
{ }, {
println("Hello world") println("Hello world")
}, })
{
println("Hello world")
},
)
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable( useCallable({ println("Hello world") }
{ println("Hello world") },
) )
useCallable({ println("Hello world") }) { useCallable({ println("Hello world") }) {
@@ -95,27 +78,21 @@ fun foo() {
} }
useCallable( useCallable(
{ println("Hello world") }, { println("Hello world") })
)
useCallable("A", foo() { println("Hello world") }) useCallable("A", foo() { println("Hello world") })
useCallable( useCallable("B", "C", foo() {
"B", "C", println("Hello world")
foo() { }, foo() {
println("Hello world") println("Hello world")
}, })
foo() {
println("Hello world")
},
)
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable( useCallable(foo() { println("Hello world") }
foo() { println("Hello world") },
) )
useCallable(foo() { println("Hello world") }) { useCallable(foo() { println("Hello world") }) {
@@ -123,70 +100,52 @@ fun foo() {
} }
useCallable( useCallable(
foo() { println("Hello world") }, foo() { println("Hello world") })
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("B", "C", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, foo() {
println("Hello world")
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, )
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}
) )
useCallable( useCallable(object : Callable<Unit> {
"A", override fun call() {
object : Callable<Unit> { println("Hello world")
override fun call() { }
println("Hello world") }) {
}
},
)
useCallable(
"A",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
"B", "C",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
foo() {
println("Hello world")
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
) {
} }
@@ -195,70 +154,53 @@ fun foo() {
override fun call() { override fun call() {
println("Hello world") println("Hello world")
} }
}, })
)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo,
bar, /* bar /*
*/ /* */ */, /* */ foo
foo,
) )
testtest( testtest(/*
/* */foofoo, foofoo, foofoo, /*
*/
foofoo, foofoo, foofoo, /*
*/ */
foofoo, bar, foofoo, bar)
testtest(foofoo, foofoo, foofoo, foofoo, bar/*
*/)
testtest(foofoo, foofoo, foofoo, foofoo, bar // awdawda
) )
testtest( testtest(foofoo, foofoo, foofoo, foofoo, /*
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
)
testtest(
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
)
testtest(
foofoo, foofoo, foofoo, foofoo, /*
*/ */
bar, bar
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(foofoo, foofoo, foofoo, foofoo/*
foofoo, foofoo, foofoo, */, /* */ bar
foofoo,/*
*/ /* */
bar,
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, fososos,/* foofoo, fososos,/*
@@ -266,37 +208,25 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa) testtest(foofoo, testtest(testtest(foofoo, ))/* */, /**/testsa)
testtest( testtest(foofoo, testtest(testtest(foofoo, ))/*
foofoo, */, testsa)
testtest(testtest(foofoo)),/*
*/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), /**/testsa)
testtest( testtest(foofoo, seee, testtest(testtest(foofoo, )), /*
foofoo, seee, testtest(testtest(foofoo)), /* */testsa)
*/
testsa,
)
useCallable( useCallable("B", "C", Callable {
"B", "C", println("Hello world")
Callable { }, /* */ Callable {
println("Hello world") println("Hello world")
}, /* */ })
Callable {
println("Hello world")
},
)
useCallable( useCallable(Callable { println("Hello world") } // ffd
Callable { println("Hello world") }, // ffd
) )
useCallable( useCallable(
@@ -323,15 +253,9 @@ fun foo() {
Callable { println("Hello world") }, Callable { println("Hello world") },
) )
testtest( testtest(foofoo, testtest(testtest(
foofoo, foofoo,
testtest( )), testsa)
testtest(
foofoo,
),
),
testsa,
)
testtest( testtest(
foofoo, fososos, testtest(testtest(foofoo)), foofoo, fososos, testtest(testtest(foofoo)),
@@ -341,9 +265,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -26,15 +26,15 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo) testtest(foofoo, )
testtest(foofoo, testtest(testtest(foofoo))) testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo))) testtest(foofoo, fososos, testtest(testtest(foofoo)), )
testtest(foofoo, testtest(testtest(foofoo)), testsa) testtest(foofoo, testtest(testtest(foofoo, )), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), testsa)
useCallable("A", Callable { println("Hello world") }) useCallable("A", Callable { println("Hello world") })
@@ -46,7 +46,7 @@ fun foo() {
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable(Callable { println("Hello world") } useCallable(Callable { println("Hello world") }
) )
@@ -68,7 +68,7 @@ fun foo() {
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable({ println("Hello world") } useCallable({ println("Hello world") }
) )
@@ -90,7 +90,7 @@ fun foo() {
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable(foo() { println("Hello world") } useCallable(foo() { println("Hello world") }
) )
@@ -128,13 +128,11 @@ fun foo() {
} }
}) })
useCallable( useCallable(object : Callable<Unit> {
object : Callable<Unit> { override fun call() {
override fun call() { println("Hello world")
println("Hello world") }
} }, )
},
)
useCallable(object : Callable<Unit> { useCallable(object : Callable<Unit> {
override fun call() { override fun call() {
@@ -189,7 +187,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest(foofoo, foofoo, foofoo, foofoo/* testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar */, /* */ bar
@@ -202,7 +200,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, fososos,/* foofoo, fososos,/*
@@ -210,16 +208,16 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa) testtest(foofoo, testtest(testtest(foofoo, ))/* */, /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* testtest(foofoo, testtest(testtest(foofoo, ))/*
*/, testsa) */, testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /* testtest(foofoo, seee, testtest(testtest(foofoo, )), /*
*/testsa) */testsa)
useCallable("B", "C", Callable { useCallable("B", "C", Callable {
@@ -267,9 +265,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -2,64 +2,53 @@
// SET_TRUE: ALLOW_TRAILING_COMMA // SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() { fun foo() {
testtest(foofoo, foofoo, foofoo,
foofoo, bar)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, bar
foofoo, bar, )
testtest(foofoo, foofoo, foofoo, foofoo, bar
)
testtest(foofoo, foofoo, foofoo, foofoo,
bar
)
testtest(foofoo
) )
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, bar, foofoo)
)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, bar, foofoo
) )
testtest( testtest(foofoo, )
foofoo, foofoo, foofoo, foofoo,
bar,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(foofoo, testtest(testtest(foofoo))) testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo))) testtest(foofoo, fososos, testtest(testtest(foofoo)), )
testtest(foofoo, testtest(testtest(foofoo)), testsa) testtest(foofoo, testtest(testtest(foofoo, )), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), testsa)
useCallable("A", Callable { println("Hello world") }) useCallable("A", Callable { println("Hello world") })
useCallable( useCallable("B", "C", Callable {
"B", "C", println("Hello world")
Callable { }, Callable {
println("Hello world") println("Hello world")
}, })
Callable {
println("Hello world")
},
)
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable( useCallable(Callable { println("Hello world") }
Callable { println("Hello world") },
) )
useCallable(Callable { println("Hello world") }) { useCallable(Callable { println("Hello world") }) {
@@ -67,27 +56,21 @@ fun foo() {
} }
useCallable( useCallable(
Callable { println("Hello world") }, Callable { println("Hello world") })
)
useCallable("A", { println("Hello world") }) useCallable("A", { println("Hello world") })
useCallable( useCallable("B", "C", {
"B", "C", println("Hello world")
{ }, {
println("Hello world") println("Hello world")
}, })
{
println("Hello world")
},
)
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable( useCallable({ println("Hello world") }
{ println("Hello world") },
) )
useCallable({ println("Hello world") }) { useCallable({ println("Hello world") }) {
@@ -95,27 +78,21 @@ fun foo() {
} }
useCallable( useCallable(
{ println("Hello world") }, { println("Hello world") })
)
useCallable("A", foo() { println("Hello world") }) useCallable("A", foo() { println("Hello world") })
useCallable( useCallable("B", "C", foo() {
"B", "C", println("Hello world")
foo() { }, foo() {
println("Hello world") println("Hello world")
}, })
foo() {
println("Hello world")
},
)
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable( useCallable(foo() { println("Hello world") }
foo() { println("Hello world") },
) )
useCallable(foo() { println("Hello world") }) { useCallable(foo() { println("Hello world") }) {
@@ -123,70 +100,52 @@ fun foo() {
} }
useCallable( useCallable(
foo() { println("Hello world") }, foo() { println("Hello world") })
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("B", "C", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, foo() {
println("Hello world")
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, )
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}
) )
useCallable( useCallable(object : Callable<Unit> {
"A", override fun call() {
object : Callable<Unit> { println("Hello world")
override fun call() { }
println("Hello world") }) {
}
},
)
useCallable(
"A",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
"B", "C",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
foo() {
println("Hello world")
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
) {
} }
@@ -195,70 +154,53 @@ fun foo() {
override fun call() { override fun call() {
println("Hello world") println("Hello world")
} }
}, })
)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo,
bar, /* bar /*
*/ /* */ */, /* */ foo
foo,
) )
testtest( testtest(/*
/* */foofoo, foofoo, foofoo, /*
*/
foofoo, foofoo, foofoo, /*
*/ */
foofoo, bar, foofoo, bar)
testtest(foofoo, foofoo, foofoo, foofoo, bar/*
*/)
testtest(foofoo, foofoo, foofoo, foofoo, bar // awdawda
) )
testtest( testtest(foofoo, foofoo, foofoo, foofoo, /*
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
)
testtest(
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
)
testtest(
foofoo, foofoo, foofoo, foofoo, /*
*/ */
bar, bar
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(foofoo, foofoo, foofoo, foofoo/*
foofoo, foofoo, foofoo, */, /* */ bar
foofoo,/*
*/ /* */
bar,
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, fososos,/* foofoo, fososos,/*
@@ -266,37 +208,25 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa) testtest(foofoo, testtest(testtest(foofoo, ))/* */, /**/testsa)
testtest( testtest(foofoo, testtest(testtest(foofoo, ))/*
foofoo, */, testsa)
testtest(testtest(foofoo)),/*
*/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), /**/testsa)
testtest( testtest(foofoo, seee, testtest(testtest(foofoo, )), /*
foofoo, seee, testtest(testtest(foofoo)), /* */testsa)
*/
testsa,
)
useCallable( useCallable("B", "C", Callable {
"B", "C", println("Hello world")
Callable { }, /* */ Callable {
println("Hello world") println("Hello world")
}, /* */ })
Callable {
println("Hello world")
},
)
useCallable( useCallable(Callable { println("Hello world") } // ffd
Callable { println("Hello world") }, // ffd
) )
useCallable( useCallable(
@@ -323,15 +253,9 @@ fun foo() {
Callable { println("Hello world") }, Callable { println("Hello world") },
) )
testtest( testtest(foofoo, testtest(testtest(
foofoo, foofoo,
testtest( )), testsa)
testtest(
foofoo,
),
),
testsa,
)
testtest( testtest(
foofoo, fososos, testtest(testtest(foofoo)), foofoo, fososos, testtest(testtest(foofoo)),
@@ -341,9 +265,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -50,24 +50,22 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo) testtest(foofoo, )
testtest(foofoo, testtest(foofoo,
testtest(testtest(foofoo))) testtest(testtest(foofoo)))
testtest( testtest(foofoo,
foofoo,
fososos, fososos,
testtest(testtest(foofoo)), testtest(testtest(foofoo)), )
)
testtest(foofoo, testtest(foofoo,
testtest(testtest(foofoo)), testtest(testtest(foofoo, )),
testsa) testsa)
testtest(foofoo, testtest(foofoo,
seee, seee,
testtest(testtest(foofoo)), testtest(testtest(foofoo, )),
testsa) testsa)
useCallable("A", useCallable("A",
@@ -84,7 +82,7 @@ fun foo() {
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable(Callable { println("Hello world") } useCallable(Callable { println("Hello world") }
) )
@@ -110,7 +108,7 @@ fun foo() {
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable({ println("Hello world") } useCallable({ println("Hello world") }
) )
@@ -136,7 +134,7 @@ fun foo() {
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable(foo() { println("Hello world") } useCallable(foo() { println("Hello world") }
) )
@@ -179,13 +177,11 @@ fun foo() {
} }
}) })
useCallable( useCallable(object : Callable<Unit> {
object : Callable<Unit> { override fun call() {
override fun call() { println("Hello world")
println("Hello world") }
} }, )
},
)
useCallable(object : Callable<Unit> { useCallable(object : Callable<Unit> {
override fun call() { override fun call() {
@@ -258,7 +254,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest(foofoo, testtest(foofoo,
foofoo, foofoo,
@@ -275,7 +271,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, foofoo,
@@ -285,26 +281,26 @@ fun foo() {
) )
testtest(foofoo, testtest(foofoo,
testtest(testtest(foofoo)), /**/ testtest(testtest(foofoo, )), /**/
testsa) testsa)
testtest(foofoo, testtest(foofoo,
testtest(testtest(foofoo))/* */, /**/ testtest(testtest(foofoo, ))/* */, /**/
testsa) testsa)
testtest(foofoo, testtest(foofoo,
testtest(testtest(foofoo))/* testtest(testtest(foofoo, ))/*
*/, */,
testsa) testsa)
testtest(foofoo, testtest(foofoo,
seee, seee,
testtest(testtest(foofoo)), /**/ testtest(testtest(foofoo, )), /**/
testsa) testsa)
testtest(foofoo, testtest(foofoo,
seee, seee,
testtest(testtest(foofoo)), /* testtest(testtest(foofoo, )), /*
*/ */
testsa) testsa)
@@ -360,9 +356,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -12,98 +12,79 @@ fun foo() {
testsa, testsa,
) )
testtest(foofoo,
foofoo,
foofoo,
foofoo,
bar)
testtest( testtest(
foofoo, foofoo,
foofoo, foofoo,
foofoo, foofoo,
foofoo, foofoo,
bar, bar
)
testtest(foofoo,
foofoo,
foofoo,
foofoo,
bar
)
testtest(foofoo,
foofoo,
foofoo,
foofoo,
bar
)
testtest(foofoo
) )
testtest( testtest(
foofoo, foofoo)
foofoo,
foofoo,
foofoo,
bar,
)
testtest( testtest(
foofoo, foofoo
foofoo,
foofoo,
foofoo,
bar,
) )
testtest( testtest(foofoo, )
foofoo,
foofoo,
foofoo,
foofoo,
bar,
)
testtest( testtest(foofoo,
foofoo, testtest(testtest(foofoo)))
)
testtest( testtest(foofoo,
foofoo,
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(
foofoo,
testtest(testtest(foofoo)),
)
testtest(
foofoo,
fososos, fososos,
testtest(testtest(foofoo)), testtest(testtest(foofoo)), )
)
testtest( testtest(foofoo,
foofoo, testtest(testtest(foofoo, )),
testtest(testtest(foofoo)), testsa)
testsa,
)
testtest( testtest(foofoo,
foofoo,
seee, seee,
testtest(testtest(foofoo)), testtest(testtest(foofoo, )),
testsa, testsa)
)
useCallable( useCallable("A",
"A", Callable { println("Hello world") })
Callable { println("Hello world") },
)
useCallable( useCallable("B",
"B",
"C", "C",
Callable { Callable {
println("Hello world") println("Hello world")
}, },
Callable { Callable {
println("Hello world") println("Hello world")
}, })
)
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable( useCallable(Callable { println("Hello world") }
Callable { println("Hello world") },
) )
useCallable(Callable { println("Hello world") }) { useCallable(Callable { println("Hello world") }) {
@@ -111,31 +92,25 @@ fun foo() {
} }
useCallable( useCallable(
Callable { println("Hello world") }, Callable { println("Hello world") })
)
useCallable( useCallable("A",
"A", { println("Hello world") })
{ println("Hello world") },
)
useCallable( useCallable("B",
"B",
"C", "C",
{ {
println("Hello world") println("Hello world")
}, },
{ {
println("Hello world") println("Hello world")
}, })
)
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable( useCallable({ println("Hello world") }
{ println("Hello world") },
) )
useCallable({ println("Hello world") }) { useCallable({ println("Hello world") }) {
@@ -143,31 +118,25 @@ fun foo() {
} }
useCallable( useCallable(
{ println("Hello world") }, { println("Hello world") })
)
useCallable( useCallable("A",
"A", foo() { println("Hello world") })
foo() { println("Hello world") },
)
useCallable( useCallable("B",
"B",
"C", "C",
foo() { foo() {
println("Hello world") println("Hello world")
}, },
foo() { foo() {
println("Hello world") println("Hello world")
}, })
)
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable( useCallable(foo() { println("Hello world") }
foo() { println("Hello world") },
) )
useCallable(foo() { println("Hello world") }) { useCallable(foo() { println("Hello world") }) {
@@ -175,29 +144,23 @@ fun foo() {
} }
useCallable( useCallable(
foo() { println("Hello world") }, foo() { println("Hello world") })
)
useCallable( useCallable("A",
"A",
object : Callable<Unit> { object : Callable<Unit> {
override fun call() { override fun call() {
println("Hello world") println("Hello world")
} }
}, })
)
useCallable( useCallable("A",
"A",
object : Callable<Unit> { object : Callable<Unit> {
override fun call() { override fun call() {
println("Hello world") println("Hello world")
} }
}, })
)
useCallable( useCallable("B",
"B",
"C", "C",
object : Callable<Unit> { object : Callable<Unit> {
override fun call() { override fun call() {
@@ -206,40 +169,32 @@ fun foo() {
}, },
foo() { foo() {
println("Hello world") println("Hello world")
}, })
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, )
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}
) )
useCallable( useCallable(object : Callable<Unit> {
object : Callable<Unit> { override fun call() {
override fun call() { println("Hello world")
println("Hello world") }
} }) {
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
) {
} }
@@ -248,88 +203,75 @@ fun foo() {
override fun call() { override fun call() {
println("Hello world") println("Hello world")
} }
}, })
)
testtest( testtest(
foofoo, foofoo,
foofoo, foofoo,
foofoo, foofoo,
foofoo, foofoo,
bar, /* bar /*
*/ /* */ */, /* */
foo, foo
) )
testtest( testtest(/*
/* */foofoo,
*/
foofoo,
foofoo, foofoo,
foofoo, /* foofoo, /*
*/ */
foofoo, foofoo,
bar, bar)
testtest(foofoo,
foofoo,
foofoo,
foofoo,
bar/*
*/)
testtest(foofoo,
foofoo,
foofoo,
foofoo,
bar // awdawda
) )
testtest( testtest(foofoo,
foofoo,
foofoo,
foofoo,
foofoo,
bar,/*
*/
)
testtest(
foofoo,
foofoo,
foofoo,
foofoo,
bar, // awdawda
)
testtest(
foofoo,
foofoo, foofoo,
foofoo, foofoo,
foofoo, /* foofoo, /*
*/ */
bar, bar
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(foofoo,
foofoo, foofoo,
foofoo, foofoo,
foofoo, foofoo/*
foofoo,/* */, /* */
*/ /* */ bar
bar,
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, foofoo,
@@ -338,53 +280,40 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest( testtest(foofoo,
foofoo, testtest(testtest(foofoo, )), /**/
testtest(testtest(foofoo)), /**/ testsa)
testsa,
)
testtest( testtest(foofoo,
foofoo, testtest(testtest(foofoo, ))/* */, /**/
testtest(testtest(foofoo)),/* */ /**/ testsa)
testsa,
)
testtest( testtest(foofoo,
foofoo, testtest(testtest(foofoo, ))/*
testtest(testtest(foofoo)),/* */,
*/ testsa)
testsa,
)
testtest( testtest(foofoo,
foofoo,
seee, seee,
testtest(testtest(foofoo)), /**/ testtest(testtest(foofoo, )), /**/
testsa, testsa)
)
testtest( testtest(foofoo,
foofoo,
seee, seee,
testtest(testtest(foofoo)), /* testtest(testtest(foofoo, )), /*
*/ */
testsa, testsa)
)
useCallable( useCallable("B",
"B",
"C", "C",
Callable { Callable {
println("Hello world") println("Hello world")
}, /* */ }, /* */
Callable { Callable {
println("Hello world") println("Hello world")
}, })
)
useCallable( useCallable(Callable { println("Hello world") } // ffd
Callable { println("Hello world") }, // ffd
) )
useCallable( useCallable(
@@ -411,15 +340,11 @@ fun foo() {
Callable { println("Hello world") }, Callable { println("Hello world") },
) )
testtest( testtest(foofoo,
foofoo, testtest(testtest(
testtest( foofoo,
testtest( )),
foofoo, testsa)
),
),
testsa,
)
testtest( testtest(
foofoo, foofoo,
@@ -431,9 +356,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -26,15 +26,15 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo) testtest(foofoo, )
testtest(foofoo, testtest(testtest(foofoo))) testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo))) testtest(foofoo, fososos, testtest(testtest(foofoo)), )
testtest(foofoo, testtest(testtest(foofoo)), testsa) testtest(foofoo, testtest(testtest(foofoo, )), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), testsa)
useCallable("A", Callable { println("Hello world") }) useCallable("A", Callable { println("Hello world") })
@@ -46,7 +46,7 @@ fun foo() {
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable(Callable { println("Hello world") } useCallable(Callable { println("Hello world") }
) )
@@ -68,7 +68,7 @@ fun foo() {
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable({ println("Hello world") } useCallable({ println("Hello world") }
) )
@@ -90,7 +90,7 @@ fun foo() {
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable(foo() { println("Hello world") } useCallable(foo() { println("Hello world") }
) )
@@ -128,13 +128,11 @@ fun foo() {
} }
}) })
useCallable( useCallable(object : Callable<Unit> {
object : Callable<Unit> { override fun call() {
override fun call() { println("Hello world")
println("Hello world") }
} }, )
},
)
useCallable(object : Callable<Unit> { useCallable(object : Callable<Unit> {
override fun call() { override fun call() {
@@ -189,7 +187,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest(foofoo, foofoo, foofoo, foofoo/* testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar */, /* */ bar
@@ -202,7 +200,7 @@ fun foo() {
foofoo foofoo
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, fososos,/* foofoo, fososos,/*
@@ -210,16 +208,16 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa) testtest(foofoo, testtest(testtest(foofoo, ))/* */, /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* testtest(foofoo, testtest(testtest(foofoo, ))/*
*/, testsa) */, testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /* testtest(foofoo, seee, testtest(testtest(foofoo, )), /*
*/testsa) */testsa)
useCallable("B", "C", Callable { useCallable("B", "C", Callable {
@@ -267,9 +265,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -2,64 +2,53 @@
// SET_TRUE: ALLOW_TRAILING_COMMA // SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() { fun foo() {
testtest(foofoo, foofoo, foofoo,
foofoo, bar)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, bar
foofoo, bar, )
testtest(foofoo, foofoo, foofoo, foofoo, bar
)
testtest(foofoo, foofoo, foofoo, foofoo,
bar
)
testtest(foofoo
) )
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, bar, foofoo)
)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, bar, foofoo
) )
testtest( testtest(foofoo, )
foofoo, foofoo, foofoo, foofoo,
bar,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(foofoo, testtest(testtest(foofoo))) testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo))) testtest(foofoo, fososos, testtest(testtest(foofoo)), )
testtest(foofoo, testtest(testtest(foofoo)), testsa) testtest(foofoo, testtest(testtest(foofoo, )), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), testsa)
useCallable("A", Callable { println("Hello world") }) useCallable("A", Callable { println("Hello world") })
useCallable( useCallable("B", "C", Callable {
"B", "C", println("Hello world")
Callable { }, Callable {
println("Hello world") println("Hello world")
}, })
Callable {
println("Hello world")
},
)
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }) useCallable(Callable { println("Hello world") }, )
useCallable( useCallable(Callable { println("Hello world") }
Callable { println("Hello world") },
) )
useCallable(Callable { println("Hello world") }) { useCallable(Callable { println("Hello world") }) {
@@ -67,27 +56,21 @@ fun foo() {
} }
useCallable( useCallable(
Callable { println("Hello world") }, Callable { println("Hello world") })
)
useCallable("A", { println("Hello world") }) useCallable("A", { println("Hello world") })
useCallable( useCallable("B", "C", {
"B", "C", println("Hello world")
{ }, {
println("Hello world") println("Hello world")
}, })
{
println("Hello world")
},
)
useCallable({ println("Hello world") }) useCallable({ println("Hello world") })
useCallable({ println("Hello world") }) useCallable({ println("Hello world") }, )
useCallable( useCallable({ println("Hello world") }
{ println("Hello world") },
) )
useCallable({ println("Hello world") }) { useCallable({ println("Hello world") }) {
@@ -95,27 +78,21 @@ fun foo() {
} }
useCallable( useCallable(
{ println("Hello world") }, { println("Hello world") })
)
useCallable("A", foo() { println("Hello world") }) useCallable("A", foo() { println("Hello world") })
useCallable( useCallable("B", "C", foo() {
"B", "C", println("Hello world")
foo() { }, foo() {
println("Hello world") println("Hello world")
}, })
foo() {
println("Hello world")
},
)
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }) useCallable(foo() { println("Hello world") }, )
useCallable( useCallable(foo() { println("Hello world") }
foo() { println("Hello world") },
) )
useCallable(foo() { println("Hello world") }) { useCallable(foo() { println("Hello world") }) {
@@ -123,70 +100,52 @@ fun foo() {
} }
useCallable( useCallable(
foo() { println("Hello world") }, foo() { println("Hello world") })
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("B", "C", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, foo() {
println("Hello world")
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, )
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}
) )
useCallable( useCallable(object : Callable<Unit> {
"A", override fun call() {
object : Callable<Unit> { println("Hello world")
override fun call() { }
println("Hello world") }) {
}
},
)
useCallable(
"A",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
"B", "C",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
foo() {
println("Hello world")
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
) {
} }
@@ -195,70 +154,53 @@ fun foo() {
override fun call() { override fun call() {
println("Hello world") println("Hello world")
} }
}, })
)
testtest( testtest(
foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo, foofoo,
bar, /* bar /*
*/ /* */ */, /* */ foo
foo,
) )
testtest( testtest(/*
/* */foofoo, foofoo, foofoo, /*
*/
foofoo, foofoo, foofoo, /*
*/ */
foofoo, bar, foofoo, bar)
testtest(foofoo, foofoo, foofoo, foofoo, bar/*
*/)
testtest(foofoo, foofoo, foofoo, foofoo, bar // awdawda
) )
testtest( testtest(foofoo, foofoo, foofoo, foofoo, /*
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
)
testtest(
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
)
testtest(
foofoo, foofoo, foofoo, foofoo, /*
*/ */
bar, bar
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(foofoo, foofoo, foofoo, foofoo/*
foofoo, foofoo, foofoo, */, /* */ bar
foofoo,/*
*/ /* */
bar,
) )
testtest( testtest(foofoo // fd
foofoo, // fd
) )
testtest( testtest( /**/
/**/ foofoo
foofoo,
) )
testtest(foofoo/**/) testtest(foofoo,/**/)
testtest( testtest(
foofoo, fososos,/* foofoo, fososos,/*
@@ -266,37 +208,25 @@ fun foo() {
testtest(testtest(foofoo)), testtest(testtest(foofoo)),
) )
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, testtest(testtest(foofoo, )), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa) testtest(foofoo, testtest(testtest(foofoo, ))/* */, /**/testsa)
testtest( testtest(foofoo, testtest(testtest(foofoo, ))/*
foofoo, */, testsa)
testtest(testtest(foofoo)),/*
*/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa) testtest(foofoo, seee, testtest(testtest(foofoo, )), /**/testsa)
testtest( testtest(foofoo, seee, testtest(testtest(foofoo, )), /*
foofoo, seee, testtest(testtest(foofoo)), /* */testsa)
*/
testsa,
)
useCallable( useCallable("B", "C", Callable {
"B", "C", println("Hello world")
Callable { }, /* */ Callable {
println("Hello world") println("Hello world")
}, /* */ })
Callable {
println("Hello world")
},
)
useCallable( useCallable(Callable { println("Hello world") } // ffd
Callable { println("Hello world") }, // ffd
) )
useCallable( useCallable(
@@ -323,15 +253,9 @@ fun foo() {
Callable { println("Hello world") }, Callable { println("Hello world") },
) )
testtest( testtest(foofoo, testtest(testtest(
foofoo, foofoo,
testtest( )), testsa)
testtest(
foofoo,
),
),
testsa,
)
testtest( testtest(
foofoo, fososos, testtest(testtest(foofoo)), foofoo, fososos, testtest(testtest(foofoo)),
@@ -341,9 +265,9 @@ fun foo() {
fun test() { fun test() {
baz( baz(
f = fun(it: Int): String = "$it", /*dwdwd f = fun(it: Int): String = "$it" /*dwdwd
*/ */,
name = "", /* name = "" /*
*/ */,
) )
} }
@@ -0,0 +1,275 @@
// SET_INT: CALL_PARAMETERS_WRAP = 1
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest(foofoo, foofoo, foofoo,
foofoo, bar)
testtest(
foofoo, foofoo, foofoo, foofoo, bar
)
testtest(foofoo, foofoo, foofoo, foofoo, bar
)
testtest(foofoo, foofoo, foofoo, foofoo,
bar
)
testtest(foofoo
)
testtest(
foofoo)
testtest(
foofoo
)
testtest(foofoo)
testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo)))
testtest(foofoo, testtest(testtest(foofoo)), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
useCallable("B", "C", Callable {
println("Hello world")
}, Callable {
println("Hello world")
})
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }
)
useCallable(Callable { println("Hello world") }) {
}
useCallable(
Callable { println("Hello world") })
useCallable("A", { println("Hello world") })
useCallable("B", "C", {
println("Hello world")
}, {
println("Hello world")
})
useCallable({ println("Hello world") })
useCallable({ println("Hello world") })
useCallable({ println("Hello world") }
)
useCallable({ println("Hello world") }) {
}
useCallable(
{ println("Hello world") })
useCallable("A", foo() { println("Hello world") })
useCallable("B", "C", foo() {
println("Hello world")
}, foo() {
println("Hello world")
})
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }
)
useCallable(foo() { println("Hello world") }) {
}
useCallable(
foo() { println("Hello world") })
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("A", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable("B", "C", object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}, foo() {
println("Hello world")
})
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}
)
useCallable(object : Callable<Unit> {
override fun call() {
println("Hello world")
}
}) {
}
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
})
testtest(
foofoo, foofoo, foofoo, foofoo,
bar /*
*/, /* */ foo
)
testtest(/*
*/foofoo, foofoo, foofoo, /*
*/
foofoo, bar)
testtest(foofoo, foofoo, foofoo, foofoo, bar/*
*/)
testtest(foofoo, foofoo, foofoo, foofoo, bar // awdawda
)
testtest(foofoo, foofoo, foofoo, foofoo, /*
*/
bar
)
testtest(foofoo // fd
)
testtest( /**/
foofoo
)
testtest(foofoo/**/)
testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
)
testtest(foofoo // fd
)
testtest( /**/
foofoo
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
*/
testtest(testtest(foofoo)),
)
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/*
*/, testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), /*
*/testsa)
useCallable("B", "C", Callable {
println("Hello world")
}, /* */ Callable {
println("Hello world")
})
useCallable(Callable { println("Hello world") } // ffd
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
foo() {
println("Hello world")
},
)
useCallable(
{
println("Hello world")
},
)
useCallable(
Callable { println("Hello world") },
)
testtest(foofoo, testtest(testtest(
foofoo,
)), testsa)
testtest(
foofoo, fososos, testtest(testtest(foofoo)),
)
}
fun test() {
baz(
f = fun(it: Int): String = "$it", /*dwdwd
*/
name = "", /*
*/
)
}
@@ -0,0 +1,349 @@
// SET_INT: CALL_PARAMETERS_WRAP = 1
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest(
foofoo, foofoo, foofoo,
foofoo, bar,
)
testtest(
foofoo, foofoo, foofoo, foofoo, bar,
)
testtest(
foofoo, foofoo, foofoo, foofoo, bar,
)
testtest(
foofoo, foofoo, foofoo, foofoo,
bar,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(foofoo, testtest(testtest(foofoo)))
testtest(foofoo, fososos, testtest(testtest(foofoo)))
testtest(foofoo, testtest(testtest(foofoo)), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
useCallable(
"B", "C",
Callable {
println("Hello world")
},
Callable {
println("Hello world")
},
)
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") }) {
}
useCallable(
Callable { println("Hello world") },
)
useCallable("A", { println("Hello world") })
useCallable(
"B", "C",
{
println("Hello world")
},
{
println("Hello world")
},
)
useCallable({ println("Hello world") })
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") }) {
}
useCallable(
{ println("Hello world") },
)
useCallable("A", foo() { println("Hello world") })
useCallable(
"B", "C",
foo() {
println("Hello world")
},
foo() {
println("Hello world")
},
)
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") }) {
}
useCallable(
foo() { println("Hello world") },
)
useCallable(
"A",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
"A",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
"B", "C",
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
foo() {
println("Hello world")
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
) {
}
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
testtest(
foofoo, foofoo, foofoo, foofoo,
bar, /*
*/ /* */
foo,
)
testtest(
/*
*/
foofoo, foofoo, foofoo, /*
*/
foofoo, bar,
)
testtest(
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
)
testtest(
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
)
testtest(
foofoo, foofoo, foofoo, foofoo, /*
*/
bar,
)
testtest(
foofoo, // fd
)
testtest(
/**/
foofoo,
)
testtest(foofoo/**/)
testtest(
foofoo, foofoo, foofoo,
foofoo,/*
*/ /* */
bar,
)
testtest(
foofoo, // fd
)
testtest(
/**/
foofoo,
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
*/
testtest(testtest(foofoo)),
)
testtest(foofoo, testtest(testtest(foofoo)), /**/testsa)
testtest(foofoo, testtest(testtest(foofoo))/* */, /**/testsa)
testtest(
foofoo,
testtest(testtest(foofoo)),/*
*/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa)
testtest(
foofoo, seee, testtest(testtest(foofoo)), /*
*/
testsa,
)
useCallable(
"B", "C",
Callable {
println("Hello world")
}, /* */
Callable {
println("Hello world")
},
)
useCallable(
Callable { println("Hello world") }, // ffd
)
useCallable(
object : Callable<Unit> {
override fun call() {
println("Hello world")
}
},
)
useCallable(
foo() {
println("Hello world")
},
)
useCallable(
{
println("Hello world")
},
)
useCallable(
Callable { println("Hello world") },
)
testtest(
foofoo,
testtest(
testtest(
foofoo,
),
),
testsa,
)
testtest(
foofoo, fososos, testtest(testtest(foofoo)),
)
}
fun test() {
baz(
f = fun(it: Int): String = "$it", /*dwdwd
*/
name = "", /*
*/
)
}
@@ -0,0 +1,479 @@
class A1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class B1 {
val x: String
val y: String
constructor(
x: String,
y: String
) {
this.x = x
this.y = y
}
}
class C1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class D1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class A2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class B2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String
) {
this.x = x
this.y = y
this.z = z
}
}
class C2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class D2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class A3 {
val x: String
constructor(x: String) {
this.x = x
}
}
class B3 {
val x: String
constructor(x: String) {
this.x = x
}
}
class C3 {
val x: String
constructor(
x: String,
) {
this.x = x
}
}
class D3 {
val x: String
constructor(
x: String,
) {
this.x = x
}
}
class E1 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String, z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class E2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String, z: String) {
this.x = x
this.y = y
this.z = z
}
}
class A1(
val x: String,
y: String,
)
class B1(
val x: String,
val y: String
)
class C1(
val x: String,
val y: String,
)
class D1(
val x: String,
val y: String,
)
class A2(
val x: String,
val y: String,
val z: String,
)
class B2(
val x: String,
val y: String,
val z: String
)
class C2(
val x: String,
val y: String,
val z: String,
)
class D2(
val x: String,
val y: String,
val z: String,
)
class A3(
val x: String,
)
class B3(
val x: String
)
class C3(
val x: String,
)
class D3(
val x: String,
)
class A4(
val x: String,
val y: String,
val z: String,
)
class B4(
val x: String,
val y: String,
val z: String
)
class C4(
val x: String,
val y: String,
val z: String,
)
class D4(
val x: String,
val y: String,
val z: String,
)
class E1(
val x: String, val y: String,
val z: String,
)
class E2(
val x: String, val y: String, val z: String
)
class C(
z: String, val v: Int, val x: Int =
42, val y: Int =
42
)
val foo1: (Int, Int) -> Int = fun(
x,
y,
): Int = 42
val foo2: (Int, Int) -> Int = fun(
x,
y
): Int {
return x + y
}
val foo3: (Int, Int) -> Int = fun(
x, y,
): Int {
return x + y
}
val foo4: (Int) -> Int = fun(
x,
): Int = 42
val foo5: (Int) -> Int = fun(
x
): Int = 42
val foo6: (Int) -> Int = fun(x): Int = 42
val foo7: (Int) -> Int = fun(x): Int = 42
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
val foo9: (Int, Int, Int) -> Int = fun(
x,
y: Int,
z,
): Int = 42
val foo10: (Int, Int, Int) -> Int = fun(
x,
y: Int,
z: Int
): Int = 43
val foo10 = fun(
x: Int,
y: Int,
z: Int
): Int = 43
val foo11 = fun(
x: Int,
y: Int,
z: Int,
): Int = 43
val foo12 = fun(
x: Int, y: Int, z: Int,
): Int = 43
val foo13 = fun(
x: Int, y: Int, z: Int,
): Int = 43
val foo14 = fun(
x: Int, y: Int, z: Int,
): Int = 43
fun a1(
x: String,
y: String,
) = Unit
fun b1(
x: String,
y: String
) = Unit
fun c1(
x: String,
y: String,
) = Unit
fun d1(
x: String,
y: String,
) = Unit
fun a2(
x: String,
y: String,
z: String,
) = Unit
fun b2(
x: String,
y: String,
z: String
) = Unit
fun c2(
x: String,
y: String,
z: String,
) = Unit
fun d2(
x: String,
y: String,
z: String,
) = Unit
fun a3(
x: String,
) = Unit
fun b3(
x: String
) = Unit
fun c3(
x: String,
) = Unit
fun d3(
x: String,
) = Unit
fun a4(
x: String,
y: String,
z: String,
) = Unit
fun b4(
x: String,
y: String,
z: String
) = Unit
fun c4(
x: String,
y: String,
z: String,
) = Unit
fun d4(
x: String,
y: String,
z: String,
) = Unit
fun foo(
x: Int =
42
) {
}
class C(
val x: Int =
42
)
class G(
val x: String, val y: String
= "", /* */ val z: String
)
class G(
val x: String, val y: String
= "" /* */, /* */ val z: String
)
class H(
val x: String, /*
*/
val y: String,
val z: String,
)
class J(
val x: String, val y: String,
val z: String, /*
*/
)
class K(
val x: String, val y: String,
val z: String,
)
class L(
val x: String, val y: String, val z: String // adwd
)
// SET_TRUE: ALLOW_TRAILING_COMMA
// SET_INT: METHOD_PARAMETERS_WRAP = 1
@@ -0,0 +1,486 @@
class A1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class B1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class C1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class D1 {
val x: String
val y: String
constructor(
x: String,
y: String,
) {
this.x = x
this.y = y
}
}
class A2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class B2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class C2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class D2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String,
z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class A3 {
val x: String
constructor(x: String) {
this.x = x
}
}
class B3 {
val x: String
constructor(x: String) {
this.x = x
}
}
class C3 {
val x: String
constructor(
x: String,
) {
this.x = x
}
}
class D3 {
val x: String
constructor(
x: String,
) {
this.x = x
}
}
class E1 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String, z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class E2 {
val x: String
val y: String
val z: String
constructor(
x: String,
y: String, z: String,
) {
this.x = x
this.y = y
this.z = z
}
}
class A1(
val x: String,
y: String,
)
class B1(
val x: String,
val y: String,
)
class C1(
val x: String,
val y: String,
)
class D1(
val x: String,
val y: String,
)
class A2(
val x: String,
val y: String,
val z: String,
)
class B2(
val x: String,
val y: String,
val z: String,
)
class C2(
val x: String,
val y: String,
val z: String,
)
class D2(
val x: String,
val y: String,
val z: String,
)
class A3(
val x: String,
)
class B3(
val x: String,
)
class C3(
val x: String,
)
class D3(
val x: String,
)
class A4(
val x: String,
val y: String,
val z: String,
)
class B4(
val x: String,
val y: String,
val z: String,
)
class C4(
val x: String,
val y: String,
val z: String,
)
class D4(
val x: String,
val y: String,
val z: String,
)
class E1(
val x: String, val y: String,
val z: String,
)
class E2(
val x: String, val y: String, val z: String,
)
class C(
z: String, val v: Int,
val x: Int =
42,
val y: Int =
42,
)
val foo1: (Int, Int) -> Int = fun(
x,
y,
): Int = 42
val foo2: (Int, Int) -> Int = fun(
x,
y,
): Int {
return x + y
}
val foo3: (Int, Int) -> Int = fun(
x, y,
): Int {
return x + y
}
val foo4: (Int) -> Int = fun(
x,
): Int = 42
val foo5: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (Int) -> Int = fun(x): Int = 42
val foo7: (Int) -> Int = fun(x): Int = 42
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
val foo9: (Int, Int, Int) -> Int = fun(
x,
y: Int,
z,
): Int = 42
val foo10: (Int, Int, Int) -> Int = fun(
x,
y: Int,
z: Int,
): Int = 43
val foo10 = fun(
x: Int,
y: Int,
z: Int,
): Int = 43
val foo11 = fun(
x: Int,
y: Int,
z: Int,
): Int = 43
val foo12 = fun(
x: Int, y: Int, z: Int,
): Int = 43
val foo13 = fun(
x: Int, y: Int, z: Int,
): Int = 43
val foo14 = fun(
x: Int, y: Int, z: Int,
): Int = 43
fun a1(
x: String,
y: String,
) = Unit
fun b1(
x: String,
y: String,
) = Unit
fun c1(
x: String,
y: String,
) = Unit
fun d1(
x: String,
y: String,
) = Unit
fun a2(
x: String,
y: String,
z: String,
) = Unit
fun b2(
x: String,
y: String,
z: String,
) = Unit
fun c2(
x: String,
y: String,
z: String,
) = Unit
fun d2(
x: String,
y: String,
z: String,
) = Unit
fun a3(
x: String,
) = Unit
fun b3(
x: String,
) = Unit
fun c3(
x: String,
) = Unit
fun d3(
x: String,
) = Unit
fun a4(
x: String,
y: String,
z: String,
) = Unit
fun b4(
x: String,
y: String,
z: String,
) = Unit
fun c4(
x: String,
y: String,
z: String,
) = Unit
fun d4(
x: String,
y: String,
z: String,
) = Unit
fun foo(
x: Int =
42,
) {
}
class C(
val x: Int =
42,
)
class G(
val x: String,
val y: String
= "", /* */
val z: String,
)
class G(
val x: String,
val y: String
= "", /* */ /* */
val z: String,
)
class H(
val x: String, /*
*/
val y: String,
val z: String,
)
class J(
val x: String, val y: String,
val z: String, /*
*/
)
class K(
val x: String, val y: String,
val z: String,
)
class L(
val x: String, val y: String, val z: String, // adwd
)
// SET_TRUE: ALLOW_TRAILING_COMMA
// SET_INT: METHOD_PARAMETERS_WRAP = 1
@@ -14,6 +14,7 @@ import com.intellij.openapi.roots.LanguageLevelProjectExtension;
import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.registry.RegistryValue;
import com.intellij.pom.java.LanguageLevel; import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile; import com.intellij.psi.PsiFile;
@@ -116,19 +117,28 @@ public abstract class AbstractFormatterTest extends KotlinLightIdeaTestCase {
} }
public void doTest(@NotNull String expectedFileNameWithExtension) throws Exception { public void doTest(@NotNull String expectedFileNameWithExtension) throws Exception {
doTest(expectedFileNameWithExtension, false); doTest(expectedFileNameWithExtension, false, false);
} }
public void doTestInverted(@NotNull String expectedFileNameWithExtension) throws Exception { public void doTestInverted(@NotNull String expectedFileNameWithExtension) throws Exception {
doTest(expectedFileNameWithExtension, true); doTest(expectedFileNameWithExtension, true, false);
} }
public void doTest(@NotNull String expectedFileNameWithExtension, boolean inverted) throws Exception { public void doTestInvertedCallSite(@NotNull String expectedFileNameWithExtension) throws Exception {
doTest(expectedFileNameWithExtension, true, true);
}
public void doTestCallSite(@NotNull String expectedFileNameWithExtension) throws Exception {
doTest(expectedFileNameWithExtension, false, true);
}
public void doTest(@NotNull String expectedFileNameWithExtension, boolean inverted, boolean callSite) throws Exception {
String testFileName = expectedFileNameWithExtension.substring(0, expectedFileNameWithExtension.indexOf(".")); String testFileName = expectedFileNameWithExtension.substring(0, expectedFileNameWithExtension.indexOf("."));
String testFileExtension = expectedFileNameWithExtension.substring(expectedFileNameWithExtension.lastIndexOf(".")); String testFileExtension = expectedFileNameWithExtension.substring(expectedFileNameWithExtension.lastIndexOf("."));
String originalFileText = FileUtil.loadFile(new File(testFileName + testFileExtension), true); String originalFileText = FileUtil.loadFile(new File(testFileName + testFileExtension), true);
CodeStyleSettings codeStyleSettings = CodeStyle.getSettings(getProject_()); CodeStyleSettings codeStyleSettings = CodeStyle.getSettings(getProject_());
RegistryValue registryValue = Registry.get("kotlin.formatter.allowTrailingCommaOnCallSite");
try { try {
Integer rightMargin = InTextDirectivesUtils.getPrefixedInt(originalFileText, "// RIGHT_MARGIN: "); Integer rightMargin = InTextDirectivesUtils.getPrefixedInt(originalFileText, "// RIGHT_MARGIN: ");
if (rightMargin != null) { if (rightMargin != null) {
@@ -148,10 +158,12 @@ public abstract class AbstractFormatterTest extends KotlinLightIdeaTestCase {
configurator.configureInvertedSettings(); configurator.configureInvertedSettings();
} }
registryValue.setValue(callSite);
doTextTest(originalFileText, new File(expectedFileNameWithExtension), testFileExtension); doTextTest(originalFileText, new File(expectedFileNameWithExtension), testFileExtension);
} }
finally { finally {
codeStyleSettings.clearCodeStyleSettings(); codeStyleSettings.clearCodeStyleSettings();
registryValue.resetToDefault();
} }
} }
} }
@@ -1386,6 +1386,184 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
} }
} }
@TestMetadata("idea/testData/formatter/trailingComma")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FormatterCallSite extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInFormatterCallSite() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("idea/testData/formatter/trailingComma/collectionLiteralExpression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CollectionLiteralExpression extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInCollectionLiteralExpression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/collectionLiteralExpression"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("CollectionLiteralInAnnotation.call.after.kt")
public void testCollectionLiteralInAnnotation() throws Exception {
runTest("idea/testData/formatter/trailingComma/collectionLiteralExpression/CollectionLiteralInAnnotation.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/destructionDeclaration")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DestructionDeclaration extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInDestructionDeclaration() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/destructionDeclaration"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
}
@TestMetadata("idea/testData/formatter/trailingComma/enumEntry")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class EnumEntry extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInEnumEntry() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/enumEntry"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
}
@TestMetadata("idea/testData/formatter/trailingComma/indices")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Indices extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInIndices() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/indices"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("IndicesAccess.call.after.kt")
public void testIndicesAccess() throws Exception {
runTest("idea/testData/formatter/trailingComma/indices/IndicesAccess.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/lambdaParameters")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class LambdaParameters extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInLambdaParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/lambdaParameters"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("LambdaParameterList.call.after.kt")
public void testLambdaParameterList() throws Exception {
runTest("idea/testData/formatter/trailingComma/lambdaParameters/LambdaParameterList.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/typeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TypeArguments extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInTypeArguments() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/typeArguments"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("TypeArgumentList.call.after.kt")
public void testTypeArgumentList() throws Exception {
runTest("idea/testData/formatter/trailingComma/typeArguments/TypeArgumentList.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/typeParameters")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TypeParameters extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInTypeParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/typeParameters"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("TypeParameterList.call.after.kt")
public void testTypeParameterList() throws Exception {
runTest("idea/testData/formatter/trailingComma/typeParameters/TypeParameterList.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/valueArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ValueArguments extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInValueArguments() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/valueArguments"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("ArgumentListWrapAsNeeded.call.after.kt")
public void testArgumentListWrapAsNeeded() throws Exception {
runTest("idea/testData/formatter/trailingComma/valueArguments/ArgumentListWrapAsNeeded.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/valueParameters")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ValueParameters extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInValueParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/valueParameters"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
@TestMetadata("ParameterListWrapAsNeeded.call.after.kt")
public void testParameterListWrapAsNeeded() throws Exception {
runTest("idea/testData/formatter/trailingComma/valueParameters/ParameterListWrapAsNeeded.call.after.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/whenEntry")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class WhenEntry extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInWhenEntry() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/whenEntry"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.kt.*$"), null, true);
}
}
}
@TestMetadata("idea/testData/formatter") @TestMetadata("idea/testData/formatter")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
@@ -1983,4 +2161,182 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
} }
} }
} }
@TestMetadata("idea/testData/formatter/trailingComma")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FormatterInvertedCallSite extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInFormatterInvertedCallSite() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("idea/testData/formatter/trailingComma/collectionLiteralExpression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CollectionLiteralExpression extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInCollectionLiteralExpression() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/collectionLiteralExpression"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("CollectionLiteralInAnnotation.call.after.inv.kt")
public void testCollectionLiteralInAnnotation() throws Exception {
runTest("idea/testData/formatter/trailingComma/collectionLiteralExpression/CollectionLiteralInAnnotation.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/destructionDeclaration")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DestructionDeclaration extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInDestructionDeclaration() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/destructionDeclaration"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
}
@TestMetadata("idea/testData/formatter/trailingComma/enumEntry")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class EnumEntry extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInEnumEntry() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/enumEntry"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
}
@TestMetadata("idea/testData/formatter/trailingComma/indices")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Indices extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInIndices() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/indices"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("IndicesAccess.call.after.inv.kt")
public void testIndicesAccess() throws Exception {
runTest("idea/testData/formatter/trailingComma/indices/IndicesAccess.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/lambdaParameters")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class LambdaParameters extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInLambdaParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/lambdaParameters"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("LambdaParameterList.call.after.inv.kt")
public void testLambdaParameterList() throws Exception {
runTest("idea/testData/formatter/trailingComma/lambdaParameters/LambdaParameterList.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/typeArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TypeArguments extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInTypeArguments() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/typeArguments"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("TypeArgumentList.call.after.inv.kt")
public void testTypeArgumentList() throws Exception {
runTest("idea/testData/formatter/trailingComma/typeArguments/TypeArgumentList.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/typeParameters")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TypeParameters extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInTypeParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/typeParameters"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("TypeParameterList.call.after.inv.kt")
public void testTypeParameterList() throws Exception {
runTest("idea/testData/formatter/trailingComma/typeParameters/TypeParameterList.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/valueArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ValueArguments extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInValueArguments() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/valueArguments"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("ArgumentListWrapAsNeeded.call.after.inv.kt")
public void testArgumentListWrapAsNeeded() throws Exception {
runTest("idea/testData/formatter/trailingComma/valueArguments/ArgumentListWrapAsNeeded.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/valueParameters")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ValueParameters extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInValueParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/valueParameters"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
@TestMetadata("ParameterListWrapAsNeeded.call.after.inv.kt")
public void testParameterListWrapAsNeeded() throws Exception {
runTest("idea/testData/formatter/trailingComma/valueParameters/ParameterListWrapAsNeeded.call.after.inv.kt");
}
}
@TestMetadata("idea/testData/formatter/trailingComma/whenEntry")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class WhenEntry extends AbstractFormatterTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTestInvertedCallSite, this, testDataFilePath);
}
public void testAllFilesPresentInWhenEntry() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/formatter/trailingComma/whenEntry"), Pattern.compile("^([^\\.]+)\\.call\\.after\\.inv\\.kt.*$"), null, true);
}
}
}
} }
@@ -1462,7 +1462,7 @@ class SmartEnterTest : KotlinLightCodeInsightFixtureTestCase() {
""" """
fun foo(i: Int) = 1 fun foo(i: Int) = 1
fun test4() { fun test4() {
foo(1<caret>) foo(1, <caret>)
} }
""" """
) )
@@ -1,9 +1,6 @@
internal class C( internal class C(private val p1: Int /* parameter p1 */ // field p1
private val p1: Int /* parameter p1 */ // field p1 ,
, /**
/** * Field myP2
* Field myP2 */
*/ private val myP2: Int, /* Field p3 */ var p3: Int)
private val myP2: Int, /* Field p3 */
var p3: Int
)
+2 -4
View File
@@ -66,15 +66,13 @@ internal class A {
val s = "test string" val s = "test string"
s == "test" s == "test"
s.equals( s.equals(
"tesT" "tesT", ignoreCase = true)
, ignoreCase = true)
s.compareTo("Test", ignoreCase = true) s.compareTo("Test", ignoreCase = true)
s.regionMatches( s.regionMatches(
0, 0,
"TE", "TE",
0, 0,
2 2, ignoreCase = true)
, ignoreCase = true)
s.regionMatches(0, "st", 1, 2) s.regionMatches(0, "st", 1, 2)
s.replace("\\w+".toRegex(), "---") s.replace("\\w+".toRegex(), "---")
.replaceFirst("([s-t])".toRegex(), "A$1") .replaceFirst("([s-t])".toRegex(), "A$1")