TrailingCommaPostFormatProcessor: should be completed in one round

#KT-34744
This commit is contained in:
Dmitry Gridin
2020-01-10 12:59:36 +07:00
parent 8a45d2eb58
commit 9511348497
48 changed files with 782 additions and 913 deletions
@@ -746,9 +746,7 @@ abstract class KotlinCommonBlock(
}
if (nodePsi.operationToken == ELVIS && nodePsi.getStrictParentOfType<KtStringTemplateExpression>() == null) {
return { childElement ->
if (childElement.elementType == OPERATION_REFERENCE && (childElement.psi as? KtOperationReferenceExpression)
?.operationSignTokenType == ELVIS
) {
if (childElement.elementType == OPERATION_REFERENCE && (childElement.psi as? KtOperationReferenceExpression)?.operationSignTokenType == ELVIS) {
Wrap.createWrap(settings.kotlinCustomSettings.WRAP_ELVIS_EXPRESSIONS, true)
} else {
null
@@ -766,11 +764,12 @@ abstract class KotlinCommonBlock(
fun(childElement: ASTNode): Wrap? = trailingCommaWrappingStrategyWithMultiLineCheck(leftAnchor, rightAnchor)(childElement)
private val ASTNode.withTrailingComma: Boolean
get() = when {
lastChildNode?.let { getSiblingWithoutWhitespaceAndComments(it) }?.elementType === COMMA -> true
settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA -> psi?.let(PsiElement::isMultiline) == true
else -> false
}
get() = if (settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA ||
lastChildNode?.let { getSiblingWithoutWhitespaceAndComments(it) }?.elementType === COMMA
)
psi?.let(PsiElement::isMultiline) == true
else
false
private fun ASTNode.notDelimiterSiblingNodeInSequence(
forward: Boolean,
@@ -47,26 +47,27 @@ fun PsiElement.getLineCount(): Int {
fun PsiElement.isMultiline() = getLineCount() > 1
fun KtFunctionLiteral.needTrailingComma(settings: CodeStyleSettings): Boolean = needTrailingComma(
fun KtFunctionLiteral.needTrailingComma(settings: CodeStyleSettings, checkTrailingComma: Boolean = true): Boolean = needTrailingComma(
settings = settings,
trailingComma = { valueParameterList?.trailingComma },
trailingComma = { if (checkTrailingComma) valueParameterList?.trailingComma else null },
globalStartOffset = { valueParameterList?.startOffset },
globalEndOffset = { arrow?.endOffset }
)
fun KtWhenEntry.needTrailingComma(settings: CodeStyleSettings): Boolean = needTrailingComma(
fun KtWhenEntry.needTrailingComma(settings: CodeStyleSettings, checkTrailingComma: Boolean = true): Boolean = needTrailingComma(
settings = settings,
trailingComma = { trailingComma },
trailingComma = { if (checkTrailingComma) trailingComma else null },
additionalCheck = { !isElse },
globalEndOffset = { arrow?.endOffset }
)
fun KtDestructuringDeclaration.needTrailingComma(settings: CodeStyleSettings): Boolean = needTrailingComma(
settings = settings,
trailingComma = { trailingComma },
globalStartOffset = { lPar?.startOffset },
globalEndOffset = { rPar?.endOffset }
)
fun KtDestructuringDeclaration.needTrailingComma(settings: CodeStyleSettings, checkTrailingComma: Boolean = true): Boolean =
needTrailingComma(
settings = settings,
trailingComma = { if (checkTrailingComma) trailingComma else null },
globalStartOffset = { lPar?.startOffset },
globalEndOffset = { rPar?.endOffset }
)
fun <T : PsiElement> T.needTrailingComma(
settings: CodeStyleSettings,
@@ -74,7 +75,7 @@ fun <T : PsiElement> T.needTrailingComma(
additionalCheck: () -> Boolean = { true },
globalStartOffset: T.() -> Int? = PsiElement::startOffset,
globalEndOffset: T.() -> Int? = PsiElement::endOffset
) = trailingComma() != null || settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA && additionalCheck() && run(fun(): Boolean {
) = (trailingComma() != null || settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA) && additionalCheck() && run(fun(): Boolean {
val startOffset = globalStartOffset() ?: return false
val endOffset = globalEndOffset() ?: return false
return containsLineBreakInThis(startOffset, endOffset)
@@ -14,6 +14,7 @@ import com.intellij.psi.PsiFile
import com.intellij.psi.PsiWhiteSpace
import com.intellij.psi.codeStyle.CodeStyleManager
import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.impl.source.PostprocessReformattingAspect
import com.intellij.psi.impl.source.codeStyle.PostFormatProcessor
import com.intellij.psi.impl.source.codeStyle.PostFormatProcessorHelper
import com.intellij.psi.tree.TokenSet
@@ -27,6 +28,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getPrevSiblingIgnoringWhitespaceAndComme
import org.jetbrains.kotlin.psi.psiUtil.siblings
import org.jetbrains.kotlin.utils.addToStdlib.cast
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
import org.jetbrains.kotlin.utils.ifEmpty
class TrailingCommaPostFormatProcessor : PostFormatProcessor {
override fun processElement(source: PsiElement, settings: CodeStyleSettings): PsiElement =
@@ -36,6 +38,8 @@ class TrailingCommaPostFormatProcessor : PostFormatProcessor {
TrailingCommaVisitor(settings).processText(source, rangeToReformat)
}
private fun postFormatIsEnable(source: PsiElement): Boolean = !PostprocessReformattingAspect.getInstance(source.project).isDisabled
private class TrailingCommaVisitor(val settings: CodeStyleSettings) : KtTreeVisitorVoid() {
private val myPostProcessor = PostFormatProcessorHelper(settings.kotlinCommonSettings)
@@ -86,52 +90,56 @@ private class TrailingCommaVisitor(val settings: CodeStyleSettings) : KtTreeVisi
private fun processCommaOwner(parent: KtElement) {
val lastElement = parent.lastCommaOwnerOrComma ?: return
val elementType = lastElement.safeAs<ASTNode>()?.elementType
if (elementType === KtTokens.COMMA || parent.needComma) {
// add a missing comma
if (elementType !== KtTokens.COMMA) {
changePsi(parent) { factory ->
lastElement.addCommaAfter(factory)
true
when {
parent.needComma(false) -> {
// add a missing comma
if (elementType !== KtTokens.COMMA) {
lastElement.addCommaAfter(KtPsiFactory(parent))
}
}
correctCommaPosition(parent)
correctCommaPosition(parent)
}
parent.needComma(true) -> {
if (elementType === KtTokens.COMMA) correctCommaPosition(parent)
}
elementType === KtTokens.COMMA -> {
// remove redundant comma
lastElement.delete()
}
}
if (postFormatIsEnable(parent)) {
updatePsi(parent)
}
}
private val KtElement.needComma: Boolean
get() = when {
this is KtWhenEntry -> needTrailingComma(settings)
parent is KtFunctionLiteral -> parent.cast<KtFunctionLiteral>().needTrailingComma(settings)
this is KtDestructuringDeclaration -> needTrailingComma(settings)
else -> settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA && isMultiline()
}
private fun KtElement.needComma(ignoreTrailingComma: Boolean): Boolean = when {
this is KtWhenEntry -> needTrailingComma(settings, ignoreTrailingComma)
parent is KtFunctionLiteral -> parent.cast<KtFunctionLiteral>().needTrailingComma(settings, ignoreTrailingComma)
this is KtDestructuringDeclaration -> needTrailingComma(settings, ignoreTrailingComma)
else -> (ignoreTrailingComma || settings.kotlinCustomSettings.ALLOW_TRAILING_COMMA) && isMultiline()
}
private fun changePsi(element: KtElement, update: (KtPsiFactory) -> Boolean) {
private fun updatePsi(element: KtElement) {
val oldLength = element.textLength
if (update(KtPsiFactory(element))) {
PostprocessReformattingAspect.getInstance(element.project).disablePostprocessFormattingInside {
val result = CodeStyleManager.getInstance(element.project).reformat(element)
myPostProcessor.updateResultRange(oldLength, result.textLength)
}
}
private fun correctCommaPosition(parent: KtElement) {
if (!postFormatIsEnable(parent)) return
val invalidElements = parent.firstChild?.siblings(withItself = false)?.mapNotNull {
if (it.safeAs<ASTNode>()?.elementType != KtTokens.COMMA) return@mapNotNull null
it.createSmartPointer()
}?.toList() ?: return
}?.toList().orEmpty().ifEmpty { return }
if (invalidElements.isNotEmpty()) {
changePsi(parent) { factory ->
var change = false
for (pointerToComma in invalidElements) {
pointerToComma.element?.let {
if (correctComma(it, factory)) {
change = true
}
}
}
change
val factory = KtPsiFactory(parent)
for (pointerToComma in invalidElements) {
pointerToComma.element?.let {
correctComma(it, factory)
}
}
}
@@ -161,25 +169,21 @@ private fun PsiElement.addCommaAfter(factory: KtPsiFactory) {
parent.addAfter(comma, this)
}
private fun correctComma(comma: PsiElement, factory: KtPsiFactory): Boolean {
private fun correctComma(comma: PsiElement, factory: KtPsiFactory) {
val prevWithComment = comma.getPrevSiblingIgnoringWhitespace(false)
val prevWithoutComment = comma.getPrevSiblingIgnoringWhitespaceAndComments(false)
return when {
when {
prevWithoutComment?.equals(prevWithComment) == false -> {
prevWithoutComment.addCommaAfter(factory)
comma.delete()
true
}
prevWithoutComment is KtParameter -> {
val check = { element: PsiElement -> element is PsiWhiteSpace || element is PsiComment }
val lastElement = prevWithoutComment.lastChild?.takeIf(check) ?: return false
val lastElement = prevWithoutComment.lastChild?.takeIf(check) ?: return
val firstElement = lastElement.siblings(forward = false, withItself = true).takeWhile(check).last()
comma.parent.addRangeAfter(firstElement, lastElement, comma)
prevWithoutComment.deleteChildRange(firstElement, lastElement)
true
}
else ->
false
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
fun some(x: Any) {
when (x) {
is Number -> 0
else -> 1
else -> 1
}
when {
}
@@ -3,9 +3,7 @@
@Anno([1])
fun a() = Unit
@Anno([
1,
])
@Anno([1])
fun a() = Unit
@Anno([1
@@ -24,9 +22,7 @@ fun a() = Unit
@Anno([1, 2])
fun a() = Unit
@Anno([
1, 2,
])
@Anno([1, 2])
fun a() = Unit
@Anno([1, 2
@@ -45,9 +41,7 @@ fun a() = Unit
@Anno([1, 2, 2])
fun a() = Unit
@Anno([
1, 2, 2,
])
@Anno([1, 2, 2])
fun a() = Unit
@Anno(["1"
@@ -3,11 +3,7 @@
@Anno([1])
fun a() = Unit
@Anno(
[
1,
],
)
@Anno([1])
fun a() = Unit
@Anno(
@@ -34,11 +30,7 @@ fun a() = Unit
@Anno([1, 2])
fun a() = Unit
@Anno(
[
1, 2,
],
)
@Anno([1, 2])
fun a() = Unit
@Anno(
@@ -65,11 +57,7 @@ fun a() = Unit
@Anno([1, 2, 2])
fun a() = Unit
@Anno(
[
1, 2, 2,
],
)
@Anno([1, 2, 2])
fun a() = Unit
@Anno(
@@ -1,16 +1,10 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
val x: (Pair<Int, Int>, Int) -> Unit = {
(
x, y,
), /* FIXME: The result should converge in one iteration */ z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y), z ->
println(x)
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(x, y), z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y), z ->
println(x)
}
@@ -52,15 +46,11 @@ val x: (Pair<Int, Int>, Int) -> Unit = {
println(x)
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(x, y), z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y), z ->
println(x)
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(x, y/**/), z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y/**/), z ->
println(x)
}
@@ -93,9 +83,7 @@ val x: (Pair<Int, Int>, Int) -> Unit = {
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(
x, y,
),
(x, y),
z,
->
println(x)
@@ -1,16 +1,10 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
val x: (Pair<Int, Int>, Int) -> Unit = {
(
x, y,
), /* FIXME: The result should converge in one iteration */ z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y), z ->
println(x)
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(x, y), z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y), z ->
println(x)
}
@@ -55,15 +49,11 @@ val x: (Pair<Int, Int>, Int) -> Unit = {
println(x)
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(x, y), z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y), z ->
println(x)
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(x, y/**/), z,
->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y/**/), z ->
println(x)
}
@@ -105,9 +95,7 @@ val x: (Pair<Int, Int>, Int) -> Unit = {
}
val x: (Pair<Int, Int>, Int) -> Unit = {
(
x, y,
),
(x, y),
z,
->
println(x)
@@ -1,6 +1,6 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y,), /* FIXME: The result should converge in one iteration */ z, ->
val x: (Pair<Int, Int>, Int) -> Unit = { (x, y,), z, ->
println(x)
}
@@ -11,15 +11,22 @@ fun test() {
2
val (
a, b,
) = 1 to 2
val (a, b) = 1 to 2
val (a) =
b
val (
a,
) =
b
val (a
) =
b
val (a) = b
val (
a,
) = b
@@ -56,22 +63,14 @@ fun test() {
to
2
val (
a, b,/**/
) = 1 to 2
val (a, b/**/) = 1 to 2
val (
a,/**/ b,/**//**/
) = 1 to 2
val (a/**/, b/**//**/) = 1 to 2
val (
a,/**//**/
) =
val (a/**//**/) =
b
val (
a,
) = b
val (a) = b
val (a, b/**/
) = 1 to 2
@@ -11,15 +11,23 @@ fun test() {
2
val (
a, b,
) = 1 to 2
val (a, b) = 1 to 2
val (a) =
b
val (
a,
) =
b
val (
a,
) =
b
val (a) = b
val (
a,
) = b
@@ -60,22 +68,14 @@ fun test() {
to
2
val (
a, b,/**/
) = 1 to 2
val (a, b/**/) = 1 to 2
val (
a,/**/ b,/**//**/
) = 1 to 2
val (a/**/, b/**//**/) = 1 to 2
val (
a,/**//**/
) =
val (a/**//**/) =
b
val (
a,
) = b
val (a) = b
val (
a, b,/**/
@@ -16,8 +16,19 @@ fun test() {
val (a,) =
b
val (a,
) =
b
val (a
) =
b
val (a,) = b
val (
a,) = b
val (a, b
) = 1 to 2
@@ -25,23 +25,18 @@ fun foo() {
foofoo
]
testtest[
foofoo,
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]]
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, seee, testtest[testtest[
foofoo,
]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
useCallable["A", Callable { println["Hello world"] }]
@@ -53,8 +48,12 @@ fun foo() {
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[
Callable { println["Hello world"] },
Callable {
println["Hello world"]
},
]
useCallable[Callable { println["Hello world"] }
@@ -77,6 +76,8 @@ fun foo() {
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[
{ println["Hello world"] },
]
@@ -103,9 +104,7 @@ fun foo() {
override fun call() {
println["Hello world"]
}
}, foo[
0,
]]
}, foo[0]]
useCallable[object : Callable<Unit> {
override fun call() {
@@ -174,9 +173,7 @@ fun foo() {
foofoo
]
testtest[
foofoo,/**/
]
testtest[foofoo/**/]
testtest[foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
@@ -189,9 +186,7 @@ fun foo() {
foofoo
]
testtest[
foofoo,/**/
]
testtest[foofoo/**/]
testtest[
foofoo, fososos,/*
@@ -199,26 +194,16 @@ fun foo() {
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]
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]
useCallable["B", "C", Callable {
@@ -31,35 +31,18 @@ fun foo() {
foofoo,
]
testtest[
foofoo,
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]]
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, seee,
testtest[
testtest[
foofoo,
],
],
testsa,
]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
useCallable["A", Callable { println["Hello world"] }]
@@ -75,8 +58,12 @@ fun foo() {
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[
Callable { println["Hello world"] },
Callable {
println["Hello world"]
},
]
useCallable[
@@ -105,6 +92,8 @@ fun foo() {
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[
{ println["Hello world"] },
]
@@ -142,9 +131,7 @@ fun foo() {
println["Hello world"]
}
},
foo[
0,
],
foo[0],
]
useCallable[
@@ -231,9 +218,7 @@ fun foo() {
foofoo,
]
testtest[
foofoo,/**/
]
testtest[foofoo/**/]
testtest[
foofoo, foofoo, foofoo,
@@ -251,9 +236,7 @@ fun foo() {
foofoo,
]
testtest[
foofoo,/**/
]
testtest[foofoo/**/]
testtest[
foofoo, fososos,/*
@@ -261,54 +244,21 @@ fun foo() {
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[testtest[foofoo]],/*
*/
testsa,
]
testtest[
foofoo, seee,
testtest[
testtest[
foofoo,
],
], /**/
testsa,
]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[
foofoo, seee,
testtest[
testtest[
foofoo,
],
], /*
foofoo, seee, testtest[testtest[foofoo]], /*
*/
testsa,
]
@@ -29,7 +29,8 @@ fun foo() {
testtest[foofoo, testtest[testtest[foofoo]]]
testtest[foofoo, fososos, testtest[testtest[foofoo]],]
testtest[foofoo, fososos,
testtest[testtest[foofoo]],]
testtest[foofoo, testtest[testtest[foofoo,]], testsa]
@@ -47,6 +48,9 @@ fun foo() {
useCallable[Callable { println["Hello world"] },]
useCallable[Callable {
println["Hello world"] },]
useCallable[Callable { println["Hello world"] }
]
@@ -69,6 +73,9 @@ fun foo() {
useCallable[{ println["Hello world"] },]
useCallable[{ println["Hello world"] }
,]
useCallable[{ println["Hello world"] }
]
@@ -76,9 +76,7 @@ val x = { x: String
println("1")
}
val x = {
x: String,
->
val x = { x: String ->
println("1")
}
@@ -82,9 +82,7 @@ val x = {
println("1")
}
val x = {
x: String,
->
val x = { x: String ->
println("1")
}
@@ -35,23 +35,19 @@ fun foo() {
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, *, testtest<testtest<
foofoo,
>>, testsa>()
testtest<foofoo, *, testtest<testtest<foofoo>>, testsa>()
testtest<
foofoo, foofoo, foofoo, foofoo,
@@ -84,9 +80,7 @@ fun foo() {
foofoo
>()
testtest<
foofoo,/**/
>()
testtest<foofoo/**/>()
testtest<foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
@@ -99,6 +93,13 @@ fun foo() {
foofoo
>()
testtest<foofoo/**/>()
testtest<
foofoo,/*
*/
>()
testtest<
foofoo,/**/
>()
@@ -109,25 +110,15 @@ fun foo() {
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>()
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>()
}
@@ -41,35 +41,19 @@ fun foo() {
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, *,
testtest<
testtest<
foofoo,
>,
>,
testsa,
>()
testtest<foofoo, *, testtest<testtest<foofoo>>, testsa>()
testtest<
foofoo, foofoo, foofoo, foofoo,
@@ -113,9 +97,7 @@ fun foo() {
foofoo,
>()
testtest<
foofoo,/**/
>()
testtest<foofoo/**/>()
testtest<
foofoo, foofoo, foofoo,
@@ -133,6 +115,13 @@ fun foo() {
foofoo,
>()
testtest<foofoo/**/>()
testtest<
foofoo,/*
*/
>()
testtest<
foofoo,/**/
>()
@@ -143,54 +132,21 @@ fun foo() {
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<testtest<foofoo>>,/*
*/
testsa,
>()
testtest<
foofoo, seee,
testtest<
testtest<
foofoo,
>,
>, /**/
testsa,
>()
testtest<foofoo, seee, testtest<testtest<foofoo>>, /**/testsa>()
testtest<
foofoo, seee,
testtest<
testtest<
foofoo,
>,
>, /*
foofoo, seee, testtest<testtest<foofoo>>, /*
*/
testsa,
>()
@@ -39,6 +39,9 @@ fun foo() {
testtest<foofoo, fososos, testtest<testtest<foofoo>>,>()
testtest<foofoo, fososos, testtest<testtest<foofoo>>
,>()
testtest<foofoo, testtest<testtest<foofoo,>>, testsa>()
testtest<foofoo, *, testtest<testtest<foofoo,>>, testsa>()
@@ -89,6 +92,12 @@ fun foo() {
testtest<foofoo,/**/>()
testtest<foofoo,/*
*/>()
testtest<
foofoo,/**/>()
testtest<foofoo, fososos,/*
*/ testtest<testtest<foofoo>>,>()
@@ -193,9 +193,7 @@ fun <T> ag() {
}
fun <
T,
> ag() {
fun <T> ag() {
}
@@ -197,9 +197,7 @@ fun <T> ag() {
}
fun <
T,
> ag() {
fun <T> ag() {
}
@@ -26,28 +26,15 @@ fun foo() {
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,
seee,
testtest(testtest(
foofoo,
)),
testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
@@ -59,9 +46,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }
)
@@ -83,9 +68,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable({ println("Hello world") }
)
@@ -107,9 +90,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }
)
@@ -208,9 +189,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
@@ -223,9 +202,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
@@ -233,39 +210,17 @@ fun foo() {
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,
))/*
*/,
testsa)
testtest(foofoo, testtest(testtest(foofoo))/*
*/, testsa)
testtest(foofoo,
seee,
testtest(testtest(
foofoo,
)), /**/
testsa)
testtest(foofoo, seee, 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")
@@ -275,4 +230,37 @@ fun foo() {
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)),
)
}
@@ -32,36 +32,15 @@ fun foo() {
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,
seee,
testtest(
testtest(
foofoo,
),
),
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
@@ -77,9 +56,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
@@ -107,9 +84,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
@@ -137,9 +112,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
@@ -267,9 +240,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, foofoo, foofoo,
@@ -287,9 +258,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
@@ -297,56 +266,21 @@ fun foo() {
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(testtest(foofoo)),/*
*/
testsa,
)
testtest(
foofoo,
seee,
testtest(
testtest(
foofoo,
),
), /**/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa)
testtest(
foofoo,
seee,
testtest(
testtest(
foofoo,
),
), /*
foofoo, seee, testtest(testtest(foofoo)), /*
*/
testsa,
)
@@ -364,4 +298,43 @@ fun foo() {
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)),
)
}
@@ -197,4 +197,23 @@ fun foo() {
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))
,)
}
@@ -26,23 +26,15 @@ fun foo() {
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, seee, testtest(testtest(
foofoo,
)), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
@@ -54,9 +46,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }
)
@@ -78,9 +68,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable({ println("Hello world") }
)
@@ -102,9 +90,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }
)
@@ -203,9 +189,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
@@ -218,9 +202,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
@@ -228,26 +210,16 @@ fun foo() {
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)
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)
useCallable("B", "C", Callable {
@@ -258,4 +230,37 @@ fun foo() {
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)),
)
}
@@ -32,35 +32,15 @@ fun foo() {
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, seee,
testtest(
testtest(
foofoo,
),
),
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
@@ -76,9 +56,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
@@ -106,9 +84,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
@@ -136,9 +112,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
@@ -266,9 +240,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, foofoo, foofoo,
@@ -286,9 +258,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
@@ -296,54 +266,21 @@ fun foo() {
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(testtest(foofoo)),/*
*/
testsa,
)
testtest(
foofoo, seee,
testtest(
testtest(
foofoo,
),
), /**/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa)
testtest(
foofoo, seee,
testtest(
testtest(
foofoo,
),
), /*
foofoo, seee, testtest(testtest(foofoo)), /*
*/
testsa,
)
@@ -361,4 +298,43 @@ fun foo() {
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)),
)
}
@@ -197,4 +197,23 @@ fun foo() {
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))
,)
}
@@ -50,9 +50,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(foofoo,
testtest(testtest(foofoo)))
@@ -64,16 +62,12 @@ fun foo() {
)
testtest(foofoo,
testtest(testtest(
foofoo,
)),
testtest(testtest(foofoo)),
testsa)
testtest(foofoo,
seee,
testtest(testtest(
foofoo,
)),
testtest(testtest(foofoo)),
testsa)
useCallable("A",
@@ -90,9 +84,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }
)
@@ -118,9 +110,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable({ println("Hello world") }
)
@@ -146,9 +136,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }
)
@@ -270,9 +258,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(foofoo,
foofoo,
@@ -289,9 +275,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo,
@@ -301,36 +285,26 @@ fun foo() {
)
testtest(foofoo,
testtest(testtest(
foofoo,
)), /**/
testtest(testtest(foofoo)), /**/
testsa)
testtest(foofoo,
testtest(testtest(
foofoo,
))/* */, /**/
testtest(testtest(foofoo))/* */, /**/
testsa)
testtest(foofoo,
testtest(testtest(
foofoo,
))/*
testtest(testtest(foofoo))/*
*/,
testsa)
testtest(foofoo,
seee,
testtest(testtest(
foofoo,
)), /**/
testtest(testtest(foofoo)), /**/
testsa)
testtest(foofoo,
seee,
testtest(testtest(
foofoo,
)), /*
testtest(testtest(foofoo)), /*
*/
testsa)
@@ -345,4 +319,41 @@ fun foo() {
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)),
)
}
@@ -56,9 +56,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,
)
testtest(foofoo)
testtest(
foofoo,
@@ -73,22 +71,14 @@ fun foo() {
testtest(
foofoo,
testtest(
testtest(
foofoo,
),
),
testtest(testtest(foofoo)),
testsa,
)
testtest(
foofoo,
seee,
testtest(
testtest(
foofoo,
),
),
testtest(testtest(foofoo)),
testsa,
)
@@ -110,9 +100,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
@@ -144,9 +132,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
@@ -178,9 +164,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
@@ -325,9 +309,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo,
@@ -347,9 +329,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo,
@@ -360,31 +340,19 @@ fun foo() {
testtest(
foofoo,
testtest(
testtest(
foofoo,
),
), /**/
testtest(testtest(foofoo)), /**/
testsa,
)
testtest(
foofoo,
testtest(
testtest(
foofoo,
),
),/* */ /**/
testtest(testtest(foofoo)),/* */ /**/
testsa,
)
testtest(
foofoo,
testtest(
testtest(
foofoo,
),
),/*
testtest(testtest(foofoo)),/*
*/
testsa,
)
@@ -392,22 +360,14 @@ fun foo() {
testtest(
foofoo,
seee,
testtest(
testtest(
foofoo,
),
), /**/
testtest(testtest(foofoo)), /**/
testsa,
)
testtest(
foofoo,
seee,
testtest(
testtest(
foofoo,
),
), /*
testtest(testtest(foofoo)), /*
*/
testsa,
)
@@ -426,4 +386,45 @@ fun foo() {
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)),
)
}
@@ -205,4 +205,23 @@ fun foo() {
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))
,)
}
@@ -26,23 +26,15 @@ fun foo() {
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, seee, testtest(testtest(
foofoo,
)), testsa)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
@@ -54,9 +46,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(Callable { println("Hello world") }
)
@@ -78,9 +68,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable({ println("Hello world") }
)
@@ -102,9 +90,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(foo() { println("Hello world") }
)
@@ -203,9 +189,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
@@ -218,9 +202,7 @@ fun foo() {
foofoo
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
@@ -228,26 +210,16 @@ fun foo() {
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)
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)
useCallable("B", "C", Callable {
@@ -258,4 +230,37 @@ fun foo() {
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)),
)
}
@@ -32,35 +32,15 @@ fun foo() {
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, seee,
testtest(
testtest(
foofoo,
),
),
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), testsa)
useCallable("A", Callable { println("Hello world") })
@@ -76,9 +56,7 @@ fun foo() {
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
)
useCallable(Callable { println("Hello world") })
useCallable(
Callable { println("Hello world") },
@@ -106,9 +84,7 @@ fun foo() {
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
)
useCallable({ println("Hello world") })
useCallable(
{ println("Hello world") },
@@ -136,9 +112,7 @@ fun foo() {
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
)
useCallable(foo() { println("Hello world") })
useCallable(
foo() { println("Hello world") },
@@ -266,9 +240,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, foofoo, foofoo,
@@ -286,9 +258,7 @@ fun foo() {
foofoo,
)
testtest(
foofoo,/**/
)
testtest(foofoo/**/)
testtest(
foofoo, fososos,/*
@@ -296,54 +266,21 @@ fun foo() {
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(testtest(foofoo)),/*
*/
testsa,
)
testtest(
foofoo, seee,
testtest(
testtest(
foofoo,
),
), /**/
testsa,
)
testtest(foofoo, seee, testtest(testtest(foofoo)), /**/testsa)
testtest(
foofoo, seee,
testtest(
testtest(
foofoo,
),
), /*
foofoo, seee, testtest(testtest(foofoo)), /*
*/
testsa,
)
@@ -361,4 +298,43 @@ fun foo() {
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)),
)
}
@@ -197,4 +197,23 @@ fun foo() {
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))
,)
}
@@ -17,6 +17,10 @@ fun main() {
10
}
val x: (y: Comparable<Comparable<Number>>, z: Iterable<Iterable<Number>>) -> Int = {
10
}
val x: (
y: Comparable<Comparable<Number>>, z: Iterable<Iterable<Number>>,
) -> Int = {
@@ -27,9 +31,7 @@ fun main() {
10
}
val x: (
y: Comparable<Comparable<Number>>,
) -> Int = {
val x: (y: Comparable<Comparable<Number>>) -> Int = {
10
}
@@ -69,9 +71,7 @@ fun main() {
10
}
val x: (
y: Comparable<Comparable<Number>>,/**/
) -> Int = {
val x: (y: Comparable<Comparable<Number>>/**/) -> Int = {
10
}
@@ -17,6 +17,10 @@ fun main() {
10
}
val x: (y: Comparable<Comparable<Number>>, z: Iterable<Iterable<Number>>) -> Int = {
10
}
val x: (
y: Comparable<Comparable<Number>>, z: Iterable<Iterable<Number>>,
) -> Int = {
@@ -27,9 +31,7 @@ fun main() {
10
}
val x: (
y: Comparable<Comparable<Number>>,
) -> Int = {
val x: (y: Comparable<Comparable<Number>>) -> Int = {
10
}
@@ -73,9 +75,7 @@ fun main() {
10
}
val x: (
y: Comparable<Comparable<Number>>,/**/
) -> Int = {
val x: (y: Comparable<Comparable<Number>>/**/) -> Int = {
10
}
@@ -21,6 +21,11 @@ fun main() {
10
}
val x: (y: Comparable<Comparable<Number>>, z: Iterable<Iterable<Number>>,
) -> Int = {
10
}
val x: (y: Comparable<Comparable<Number>>) -> Int = {
10
}
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -306,15 +304,11 @@ val foo5: (Int) -> Int = fun(
x
): Int = 42
val foo6: (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 {
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -309,15 +307,11 @@ val foo5: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (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 {
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -306,15 +304,11 @@ val foo5: (Int) -> Int = fun(
x
): Int = 42
val foo6: (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 {
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -309,15 +307,11 @@ val foo5: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (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 {
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -315,9 +313,7 @@ val foo5: (Int) -> Int = fun(
x
): Int = 42
val foo6: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (Int) -> Int = fun(x): Int = 42
val foo7: (Int) -> Int = fun(x): Int = 42
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -316,9 +314,7 @@ val foo5: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (Int) -> Int = fun(x): Int = 42
val foo7: (Int) -> Int = fun(x): Int = 42
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -306,15 +304,11 @@ val foo5: (Int) -> Int = fun(
x
): Int = 42
val foo6: (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 {
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
@@ -117,9 +117,7 @@ class D2 {
class A3 {
val x: String
constructor(
x: String,
) {
constructor(x: String) {
this.x = x
}
}
@@ -309,15 +307,11 @@ val foo5: (Int) -> Int = fun(
x,
): Int = 42
val foo6: (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 {
val foo8: (Int, Int, Int) -> Int = fun(x, y: Int, z): Int {
return x + y
}
@@ -6,7 +6,19 @@ fun foo(x: Any) = when (x) {
fun foo(x: Any) {
when (x) {
Comparable::class, Iterable::class, String::class, /*// trailing comma*/
Comparable::class, Iterable::class, String::class /*// trailing comma*/ -> println(1)
else -> println(3)
}
when (x) {
Comparable::class, Iterable::class,
String::class /*// trailing comma*/ -> println(1)
else -> println(3)
}
when (x) {
Comparable::class, Iterable::class,
String::class, /*// trailing comma*/
-> println(1)
else -> println(3)
}
@@ -24,8 +36,7 @@ fun foo(x: Any) {
}
when (x) {
1,
-> {
1 -> {
}
else -> println(3)
@@ -6,7 +6,20 @@ fun foo(x: Any) = when (x) {
fun foo(x: Any) {
when (x) {
Comparable::class, Iterable::class, String::class, /*// trailing comma*/
Comparable::class, Iterable::class, String::class /*// trailing comma*/ -> println(1)
else -> println(3)
}
when (x) {
Comparable::class, Iterable::class,
String::class, /*// trailing comma*/
-> println(1)
else -> println(3)
}
when (x) {
Comparable::class, Iterable::class,
String::class, /*// trailing comma*/
-> println(1)
else -> println(3)
}
@@ -24,8 +37,7 @@ fun foo(x: Any) {
}
when (x) {
1,
-> {
1 -> {
}
else -> println(3)
@@ -6,7 +6,19 @@ fun foo(x: Any) = when (x) {
fun foo(x: Any) {
when (x) {
Comparable::class, Iterable::class, String::class, /*// trailing comma*/ -> println(1)
Comparable::class, Iterable::class, String::class /*// trailing comma*/ -> println(1)
else -> println(3)
}
when (x) {
Comparable::class, Iterable::class,
String::class /*// trailing comma*/ -> println(1)
else -> println(3)
}
when (x) {
Comparable::class, Iterable::class,
String::class /*// trailing comma*/, -> println(1)
else -> println(3)
}