Fix tests after disabling trailing comma
#KT-34744
This commit is contained in:
+2
-4
@@ -115,10 +115,8 @@ class SmartEnterCompletionTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun foo(p:Int) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
1 +
|
||||
2
|
||||
)<caret>
|
||||
foo(1 +
|
||||
2)<caret>
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
+5
-7
@@ -1,11 +1,9 @@
|
||||
import javax.swing.SwingUtilities
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
SwingUtilities.invokeLater(
|
||||
object : Runnable {
|
||||
override fun run() {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
)
|
||||
SwingUtilities.invokeLater(object : Runnable {
|
||||
override fun run() {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
import javax.swing.SwingUtilities
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
SwingUtilities.invokeLater(
|
||||
object : Thread(<caret>) {
|
||||
SwingUtilities.invokeLater(object : Thread(<caret>) {
|
||||
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,19 +5,19 @@ fun test() {
|
||||
a[1, 2]
|
||||
|
||||
a[
|
||||
1, 2,
|
||||
1, 2
|
||||
]
|
||||
|
||||
a[
|
||||
|
||||
1, 2,
|
||||
1, 2
|
||||
|
||||
]
|
||||
|
||||
a[
|
||||
|
||||
|
||||
1, 2,
|
||||
1, 2
|
||||
|
||||
|
||||
]
|
||||
|
||||
+2
-2
@@ -2,6 +2,6 @@
|
||||
modules = [
|
||||
AppModule::class,
|
||||
DataModule::class,
|
||||
DomainModule::class,
|
||||
],
|
||||
DomainModule::class
|
||||
]
|
||||
)
|
||||
@@ -19,7 +19,7 @@ class FooM
|
||||
}
|
||||
|
||||
class FooC(
|
||||
val x: String,
|
||||
val x: String
|
||||
) {
|
||||
|
||||
fun bar()
|
||||
|
||||
+14
-22
@@ -37,17 +37,13 @@ val s2 = Shadow { // wdwd
|
||||
val a = 42
|
||||
}
|
||||
|
||||
val s3 = Shadow(
|
||||
fun() { // wdwd
|
||||
val a = 42
|
||||
},
|
||||
)
|
||||
val s3 = Shadow(fun() { // wdwd
|
||||
val a = 42
|
||||
})
|
||||
|
||||
val s4 = Shadow(
|
||||
fun() { /* s */
|
||||
val a = 42
|
||||
},
|
||||
)
|
||||
val s4 = Shadow(fun() { /* s */
|
||||
val a = 42
|
||||
})
|
||||
|
||||
val s5 = Shadow { ->
|
||||
// wdwd
|
||||
@@ -59,19 +55,15 @@ val s6 = Shadow {
|
||||
val a = 42
|
||||
}
|
||||
|
||||
val s7 = Shadow(
|
||||
fun() {
|
||||
// wdwd
|
||||
val a = 42
|
||||
},
|
||||
)
|
||||
val s7 = Shadow(fun() {
|
||||
// wdwd
|
||||
val a = 42
|
||||
})
|
||||
|
||||
val s8 = Shadow(
|
||||
fun() {
|
||||
// wdwd
|
||||
val a = 42
|
||||
},
|
||||
)
|
||||
val s8 = Shadow(fun() {
|
||||
// wdwd
|
||||
val a = 42
|
||||
})
|
||||
|
||||
val s9 = Shadow { -> /* s */
|
||||
val a = 42
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun foo(
|
||||
x: Int,
|
||||
x: Int
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ fun foo() {
|
||||
?: DescriptorUtils.getParentOfType(
|
||||
referencedDescriptor,
|
||||
TypeAliasConstructorDescriptor::class.java,
|
||||
false,
|
||||
false
|
||||
)?.typeAliasDescriptor
|
||||
?: DescriptorUtils.getParentOfType(referencedDescriptor, FunctionDescriptor::class.java, false)
|
||||
?: return emptyList()
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ fun foo() {
|
||||
?: DescriptorUtils.getParentOfType(
|
||||
referencedDescriptor,
|
||||
TypeAliasConstructorDescriptor::class.java,
|
||||
false,
|
||||
false
|
||||
)?.typeAliasDescriptor
|
||||
?: DescriptorUtils.getParentOfType(referencedDescriptor, FunctionDescriptor::class.java, false)
|
||||
?: return emptyList()
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@ package test
|
||||
enum class EnumTest(val value: Int) {
|
||||
VALUE_1
|
||||
(
|
||||
value = 0,
|
||||
value = 0
|
||||
)
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
enum class EnumTest(val value: Int) {
|
||||
VALUE_1(
|
||||
value = 0,
|
||||
value = 0
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
enum class EnumTest(val value: Int) {
|
||||
VALUE_1(
|
||||
value = 0,
|
||||
value = 0
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
fun test() {
|
||||
someTestLong(
|
||||
12,
|
||||
13,
|
||||
)
|
||||
someTestLong(12,
|
||||
13)
|
||||
}
|
||||
|
||||
// SET_TRUE: ALIGN_MULTILINE_PARAMETERS_IN_CALLS
|
||||
+4
-8
@@ -13,10 +13,8 @@ val c = fun() = 4
|
||||
fun test() = fun test() = 4
|
||||
|
||||
fun test() {
|
||||
test(
|
||||
fun() {
|
||||
},
|
||||
)
|
||||
test(fun() {
|
||||
})
|
||||
test(fun test() {})
|
||||
test(fun test() = 5)
|
||||
|
||||
@@ -30,10 +28,8 @@ fun test() {
|
||||
test(fun test() = 4)
|
||||
}
|
||||
|
||||
fun d = fun(
|
||||
a: Int,
|
||||
b: String,
|
||||
) {
|
||||
fun d = fun(a: Int,
|
||||
b: String) {
|
||||
}
|
||||
|
||||
fun e = fun() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class GFMOutputBuilder(
|
||||
to: StringBuilder,
|
||||
to: StringBuilder
|
||||
) : MarkdownOutputBuilder(to) {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
open class GFMOutputBuilder(
|
||||
to: StringBuilder,
|
||||
to: StringBuilder
|
||||
) : MarkdownOutputBuilder(to) {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@ fun test() {
|
||||
items,
|
||||
shippingMethods,
|
||||
addresses,
|
||||
preferredAddressId,
|
||||
preferredAddressId
|
||||
) = argument
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
fun foo(
|
||||
@Deprecated("x")
|
||||
fun foo(@Deprecated("x")
|
||||
x: Int,
|
||||
@Deprecated("y")
|
||||
@Deprecated("z")
|
||||
y: Int,
|
||||
)
|
||||
y: Int)
|
||||
|
||||
// SET_INT: PARAMETER_ANNOTATION_WRAP = 2
|
||||
|
||||
+2
-3
@@ -8,8 +8,7 @@ class A(
|
||||
/**
|
||||
* Doc
|
||||
*/
|
||||
val p2: String,
|
||||
)
|
||||
val p2: String)
|
||||
|
||||
class B(
|
||||
/** Doc1 */
|
||||
@@ -18,5 +17,5 @@ class B(
|
||||
/**
|
||||
* Doc2
|
||||
*/
|
||||
val v2: Int,
|
||||
val v2: Int
|
||||
)
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
fun some(
|
||||
a :Int,
|
||||
b :String, c :Int,
|
||||
d :String, e :Int,
|
||||
d :String, e :Int
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
fun some(
|
||||
a: Int,
|
||||
b: String, c: Int,
|
||||
d: String, e: Int,
|
||||
d: String, e: Int
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -58,3 +58,4 @@ fun some(x: Any) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
+1
@@ -66,3 +66,4 @@ else
|
||||
}
|
||||
}
|
||||
}
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
abstract class RustNavigationContributorBase<T> protected constructor(
|
||||
private val indexKey: StubIndexKey<String, T>,
|
||||
private val clazz: Class<T>,
|
||||
private val clazz: Class<T>
|
||||
) : ChooseByNameContributor, GotoClassContributor
|
||||
where T : NavigationItem,
|
||||
T : RustNamedElement {
|
||||
|
||||
@@ -41,12 +41,10 @@ val x8 = foo!!!!!!!!
|
||||
val x9 = ((b!!)!!!!)!!
|
||||
.f
|
||||
|
||||
val y = xyzzy(
|
||||
foo
|
||||
.bar()
|
||||
.baz()
|
||||
.quux(),
|
||||
)
|
||||
val y = xyzzy(foo
|
||||
.bar()
|
||||
.baz()
|
||||
.quux())
|
||||
|
||||
fun foo() {
|
||||
foo
|
||||
@@ -91,4 +89,5 @@ fun foo() {
|
||||
}
|
||||
|
||||
// SET_INT: METHOD_CALL_CHAIN_WRAP = 2
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
@@ -71,4 +71,5 @@ fun foo() {
|
||||
}
|
||||
|
||||
// SET_INT: METHOD_CALL_CHAIN_WRAP = 2
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
|
||||
+2
-1
@@ -38,4 +38,5 @@ fun foo() {
|
||||
}
|
||||
|
||||
// SET_INT: METHOD_CALL_CHAIN_WRAP = 2
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
|
||||
+8
-11
@@ -12,16 +12,12 @@ fun test() {
|
||||
|
||||
fun test1() {
|
||||
val abc = ArrayList<Int>()
|
||||
.map(
|
||||
{
|
||||
it * 2
|
||||
},
|
||||
)
|
||||
.filter(
|
||||
{
|
||||
it > 4
|
||||
},
|
||||
)
|
||||
.map({
|
||||
it * 2
|
||||
})
|
||||
.filter({
|
||||
it > 4
|
||||
})
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
@@ -39,7 +35,7 @@ fun test3() {
|
||||
|
||||
fun test4() {
|
||||
val abc = ArrayList<Int>().mapTo(
|
||||
LinkedHashSet(),
|
||||
LinkedHashSet()
|
||||
) {
|
||||
it * 2
|
||||
}
|
||||
@@ -56,3 +52,4 @@ fun testWithComments() {
|
||||
}
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
@@ -56,3 +56,4 @@ fun testWithComments() {
|
||||
}
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
@@ -52,3 +52,4 @@ fun testWithComments() {
|
||||
}
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
// SET_TRUE: ALLOW_TRAILING_COMMA
|
||||
+5
-7
@@ -6,11 +6,9 @@ fun foo() {
|
||||
finish()
|
||||
}
|
||||
|
||||
FirebaseAuth.getInstance().addAuthStateListener(
|
||||
object : FirebaseAuth.AuthStateListener {
|
||||
override fun onAuthStateChanged(auth: FirebaseAuth) {
|
||||
// ...
|
||||
}
|
||||
},
|
||||
)
|
||||
FirebaseAuth.getInstance().addAuthStateListener(object : FirebaseAuth.AuthStateListener {
|
||||
override fun onAuthStateChanged(auth: FirebaseAuth) {
|
||||
// ...
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,15 +10,12 @@ fun foo() {
|
||||
testtest(foofoo)
|
||||
|
||||
testtesttesttest(
|
||||
foofoofoofoofoofoofoofoofoofoofoofoo,
|
||||
)
|
||||
foofoofoofoofoofoofoofoofoofoofoofoo)
|
||||
|
||||
testtest(foobar, barfoo)
|
||||
|
||||
testtesttesttest(
|
||||
foofoo,
|
||||
barbar,
|
||||
foobar,
|
||||
barfoo,
|
||||
)
|
||||
testtesttesttest(foofoo,
|
||||
barbar,
|
||||
foobar,
|
||||
barfoo)
|
||||
}
|
||||
@@ -11,15 +11,11 @@ fun foo() {
|
||||
|
||||
testtesttesttest(foofoofoofoofoofoofoofoofoofoofoofoo)
|
||||
|
||||
testtest(
|
||||
foobar,
|
||||
barfoo,
|
||||
)
|
||||
testtest(foobar,
|
||||
barfoo)
|
||||
|
||||
testtesttesttest(
|
||||
foofoo,
|
||||
barbar,
|
||||
foobar,
|
||||
barfoo,
|
||||
)
|
||||
testtesttesttest(foofoo,
|
||||
barbar,
|
||||
foobar,
|
||||
barfoo)
|
||||
}
|
||||
@@ -10,15 +10,12 @@ fun foo() {
|
||||
testtest(foofoo)
|
||||
|
||||
testtesttesttest(
|
||||
foofoofoofoofoofoofoofoofoofoofoofoo,
|
||||
)
|
||||
foofoofoofoofoofoofoofoofoofoofoofoo)
|
||||
|
||||
testtest(foobar, barfoo)
|
||||
|
||||
testtesttesttest(
|
||||
foofoo,
|
||||
barbar,
|
||||
foobar,
|
||||
barfoo,
|
||||
)
|
||||
testtesttesttest(foofoo,
|
||||
barbar,
|
||||
foobar,
|
||||
barfoo)
|
||||
}
|
||||
@@ -4,10 +4,8 @@
|
||||
fun foo() {
|
||||
foo(bar, baz)
|
||||
|
||||
foo(
|
||||
object : Quux {
|
||||
override fun foo() {
|
||||
}
|
||||
},
|
||||
)
|
||||
foo(object : Quux {
|
||||
override fun foo() {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
fun foo(
|
||||
x: Int =
|
||||
42,
|
||||
42
|
||||
) {
|
||||
}
|
||||
|
||||
class C(
|
||||
val x: Int =
|
||||
42,
|
||||
42
|
||||
)
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_EXPRESSION_BODIES
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
fun foo(
|
||||
x: Int =
|
||||
42,
|
||||
42
|
||||
) {
|
||||
}
|
||||
|
||||
class C(
|
||||
val x: Int =
|
||||
42,
|
||||
42
|
||||
)
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_EXPRESSION_BODIES
|
||||
|
||||
+11
-20
@@ -5,28 +5,19 @@ fun useCallable(tag: String, callable: Callable<*>) {
|
||||
fun main(args: Array<String>) {
|
||||
useCallable("A", Callable { println("Hello world") })
|
||||
|
||||
useCallable(
|
||||
"B",
|
||||
Callable {
|
||||
println("Hello world")
|
||||
},
|
||||
)
|
||||
useCallable("B", Callable {
|
||||
println("Hello world")
|
||||
})
|
||||
|
||||
useCallable(
|
||||
"C",
|
||||
object : Callable<Unit> {
|
||||
override fun call() {
|
||||
println("Hello world")
|
||||
}
|
||||
},
|
||||
)
|
||||
useCallable("C", object : Callable<Unit> {
|
||||
override fun call() {
|
||||
println("Hello world")
|
||||
}
|
||||
})
|
||||
|
||||
useCallable(
|
||||
"B",
|
||||
fun() {
|
||||
println("Hello world")
|
||||
},
|
||||
)
|
||||
useCallable("B", fun() {
|
||||
println("Hello world")
|
||||
})
|
||||
}
|
||||
|
||||
// SET_TRUE: CALL_PARAMETERS_LPAREN_ON_NEXT_LINE
|
||||
|
||||
@@ -12,12 +12,10 @@ fun testtesttesttest(foofoo: Int)
|
||||
|
||||
fun test(foo: Int, bar: Int)
|
||||
|
||||
fun testtesttesttest(
|
||||
foofoo: Int,
|
||||
barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int,
|
||||
)
|
||||
fun testtesttesttest(foofoo: Int,
|
||||
barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int)
|
||||
|
||||
fun test() {
|
||||
for (foo: Int in bar) {
|
||||
@@ -41,34 +39,26 @@ class LongLongLongLongNameCLass
|
||||
class ShorName
|
||||
class SN
|
||||
|
||||
class A(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
class A(longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass) {
|
||||
constructor(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class B(
|
||||
a: LongLongLongLongNameCLass,
|
||||
class B(a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass,
|
||||
) {
|
||||
constructor(
|
||||
a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass,
|
||||
) {
|
||||
c: LongLongLongLongNameCLass) {
|
||||
constructor(a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class C(
|
||||
sn1: ShorName,
|
||||
class C(sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
@@ -76,24 +66,20 @@ class C(
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName,
|
||||
) {
|
||||
constructor(
|
||||
sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
sn5: ShorName,
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName,
|
||||
) {
|
||||
sn9: ShorName) {
|
||||
constructor(sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
sn5: ShorName,
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName) {
|
||||
}
|
||||
}
|
||||
|
||||
class D(
|
||||
sn1: SN,
|
||||
class D(sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
@@ -106,31 +92,27 @@ class D(
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
constructor(
|
||||
sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
sn14: SN) {
|
||||
constructor(sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN) {
|
||||
}
|
||||
}
|
||||
|
||||
class E(longLongLongLongNameCLass1: LongLongLongLongNameCLass) {
|
||||
constructor(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,31 +10,23 @@ fun testtest(foofoo: Int)
|
||||
|
||||
fun testtesttesttest(foofoo: Int)
|
||||
|
||||
fun test(
|
||||
foo: Int,
|
||||
bar: Int,
|
||||
)
|
||||
fun test(foo: Int,
|
||||
bar: Int)
|
||||
|
||||
fun testtesttesttest(
|
||||
foofoo: Int,
|
||||
barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int,
|
||||
)
|
||||
fun testtesttesttest(foofoo: Int,
|
||||
barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int)
|
||||
|
||||
fun testtesttesttest(
|
||||
foofoo: Int,
|
||||
@Some barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int,
|
||||
)
|
||||
fun testtesttesttest(foofoo: Int,
|
||||
@Some barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int)
|
||||
|
||||
fun testtesttesttest(
|
||||
@Some foofoo: Int,
|
||||
@Some barbar: Int,
|
||||
@Some foobar: Int,
|
||||
barfoo: Int,
|
||||
)
|
||||
fun testtesttesttest(@Some foofoo: Int,
|
||||
@Some barbar: Int,
|
||||
@Some foobar: Int,
|
||||
barfoo: Int)
|
||||
|
||||
fun test() {
|
||||
for (foo: Int in bar) {
|
||||
@@ -58,34 +50,25 @@ class LongLongLongLongNameCLass
|
||||
class ShorName
|
||||
class SN
|
||||
|
||||
class A(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
class A(longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass,
|
||||
) {
|
||||
constructor(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass) {
|
||||
constructor(longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class B(
|
||||
a: LongLongLongLongNameCLass,
|
||||
class B(a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass,
|
||||
) {
|
||||
constructor(
|
||||
a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass,
|
||||
) {
|
||||
c: LongLongLongLongNameCLass) {
|
||||
constructor(a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class C(
|
||||
sn1: ShorName,
|
||||
class C(sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
@@ -93,24 +76,20 @@ class C(
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName,
|
||||
) {
|
||||
constructor(
|
||||
sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
sn5: ShorName,
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName,
|
||||
) {
|
||||
sn9: ShorName) {
|
||||
constructor(sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
sn5: ShorName,
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName) {
|
||||
}
|
||||
}
|
||||
|
||||
class D(
|
||||
sn1: SN,
|
||||
class D(sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
@@ -123,24 +102,21 @@ class D(
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
constructor(
|
||||
sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
sn14: SN) {
|
||||
constructor(sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,16 +135,13 @@ class G(sn1: ShorName) {
|
||||
}
|
||||
}
|
||||
|
||||
class H(
|
||||
sn1: SN,
|
||||
sn2: SN,
|
||||
) {
|
||||
class H(sn1: SN,
|
||||
sn2: SN) {
|
||||
constructor(sn1: SN) {
|
||||
}
|
||||
}
|
||||
|
||||
class I(
|
||||
sn1: SN,
|
||||
class I(sn1: SN,
|
||||
@field:Some val sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
@@ -181,23 +154,20 @@ class I(
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
constructor(
|
||||
sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
@Some sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
sn14: SN) {
|
||||
constructor(sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
@Some sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,7 @@ fun testtesttesttesttesttesttesttesttest()
|
||||
fun testtest(foofoo: Int)
|
||||
|
||||
fun testtesttesttest(
|
||||
foofoo: Int,
|
||||
)
|
||||
foofoo: Int)
|
||||
|
||||
fun test(foo: Int, bar: Int)
|
||||
|
||||
@@ -18,8 +17,7 @@ fun testtesttesttest(
|
||||
foofoo: Int,
|
||||
barbar: Int,
|
||||
foobar: Int,
|
||||
barfoo: Int,
|
||||
)
|
||||
barfoo: Int)
|
||||
|
||||
fun test() {
|
||||
for (foo: Int in bar) {
|
||||
@@ -43,34 +41,27 @@ class LongLongLongLongNameCLass
|
||||
class ShorName
|
||||
class SN
|
||||
|
||||
class A(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
class A(longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass) {
|
||||
constructor(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass2: LongLongLongLongNameCLass,
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass3: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class B(
|
||||
a: LongLongLongLongNameCLass,
|
||||
class B(a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass,
|
||||
) {
|
||||
c: LongLongLongLongNameCLass) {
|
||||
constructor(
|
||||
a: LongLongLongLongNameCLass,
|
||||
b: LongLongLongLongNameCLass,
|
||||
c: LongLongLongLongNameCLass,
|
||||
) {
|
||||
c: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class C(
|
||||
sn1: ShorName,
|
||||
class C(sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
@@ -78,68 +69,58 @@ class C(
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName,
|
||||
) {
|
||||
constructor(
|
||||
sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
sn5: ShorName,
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName,
|
||||
) {
|
||||
sn9: ShorName) {
|
||||
constructor(sn1: ShorName,
|
||||
sn2: ShorName,
|
||||
sn3: ShorName,
|
||||
sn4: ShorName,
|
||||
sn5: ShorName,
|
||||
sn6: ShorName,
|
||||
sn6: ShorName,
|
||||
sn8: ShorName,
|
||||
sn9: ShorName) {
|
||||
}
|
||||
}
|
||||
|
||||
class D(
|
||||
sn1: SN, sn2: SN,
|
||||
class D(sn1: SN, sn2: SN,
|
||||
sn3: SN, sn4: SN,
|
||||
sn5: SN, sn6: SN,
|
||||
sn6: SN, sn8: SN,
|
||||
sn9: SN, sn10: SN,
|
||||
sn11: SN, sn12: SN,
|
||||
sn13: SN, sn14: SN,
|
||||
) {
|
||||
constructor(
|
||||
sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN,
|
||||
) {
|
||||
sn13: SN, sn14: SN) {
|
||||
constructor(sn1: SN,
|
||||
sn2: SN,
|
||||
sn3: SN,
|
||||
sn4: SN,
|
||||
sn5: SN,
|
||||
sn6: SN,
|
||||
sn6: SN,
|
||||
sn8: SN,
|
||||
sn9: SN,
|
||||
sn10: SN,
|
||||
sn11: SN,
|
||||
sn12: SN,
|
||||
sn13: SN,
|
||||
sn14: SN) {
|
||||
}
|
||||
}
|
||||
|
||||
class E(longLongLongLongNameCLass1: LongLongLongLongNameCLass) {
|
||||
constructor(
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass,
|
||||
) {
|
||||
longLongLongLongNameCLass1: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class F(a: LongLongLongLongNameCLass) {
|
||||
constructor(
|
||||
a: LongLongLongLongNameCLass,
|
||||
) {
|
||||
a: LongLongLongLongNameCLass) {
|
||||
}
|
||||
}
|
||||
|
||||
class G(sn1: ShorName) {
|
||||
constructor(
|
||||
sn1: ShorName,
|
||||
) {
|
||||
sn1: ShorName) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -4,8 +4,9 @@ val x = listOf(1, 2, 3).joinToString(
|
||||
// comment2
|
||||
prefix = "= ",
|
||||
// comment3
|
||||
separator = " + ",
|
||||
separator = " + "
|
||||
// comment4
|
||||
,
|
||||
// comment1
|
||||
transform = Int::toString
|
||||
)
|
||||
+2
-4
@@ -2,8 +2,6 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
|
||||
fun test(list: List<Int>) {
|
||||
println(
|
||||
list.filter { it > 1 }
|
||||
.filter { it > 2 }
|
||||
)
|
||||
println(list.filter { it > 1 }
|
||||
.filter { it > 2 })
|
||||
}
|
||||
@@ -2,9 +2,7 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
|
||||
fun test() {
|
||||
println(
|
||||
runCatching {
|
||||
println(runCatching {
|
||||
/* lots of code*/
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
@@ -3,11 +3,9 @@
|
||||
fun foo(x: Int) {}
|
||||
|
||||
fun bar() {
|
||||
foo(
|
||||
run {
|
||||
foo(1)
|
||||
foo(2)
|
||||
1
|
||||
}
|
||||
)
|
||||
foo(run {
|
||||
foo(1)
|
||||
foo(2)
|
||||
1
|
||||
})
|
||||
}
|
||||
Vendored
+3
-6
@@ -3,12 +3,9 @@ fun test() {
|
||||
operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0
|
||||
}
|
||||
val test = Test()
|
||||
test<caret>[
|
||||
1, 2,
|
||||
{ i ->
|
||||
i
|
||||
}
|
||||
]
|
||||
test<caret>[1, 2, { i ->
|
||||
i
|
||||
}]
|
||||
}
|
||||
|
||||
fun withSuppression() {
|
||||
|
||||
Vendored
+3
-5
@@ -3,9 +3,7 @@ fun test() {
|
||||
operator fun get(fn: (i: Int) -> Int) : Int = 0
|
||||
}
|
||||
val test = Test()
|
||||
test<caret>[
|
||||
{ i ->
|
||||
i
|
||||
}
|
||||
]
|
||||
test<caret>[{ i ->
|
||||
i
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
fun test() {
|
||||
Foo.Bar().bar(
|
||||
{
|
||||
true
|
||||
}
|
||||
)
|
||||
Foo.Bar().bar({
|
||||
true
|
||||
})
|
||||
}
|
||||
Vendored
+2
-4
@@ -1,10 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
fun main(args: Array<String>) {
|
||||
val doSomething = doSomething(
|
||||
"one" + 1,
|
||||
val doSomething = doSomething("one" + 1,
|
||||
"two",
|
||||
3 * 4
|
||||
)
|
||||
3 * 4)
|
||||
val t = if (doSomething != null) doSomething else throw NullPointerException("Expression 'doSomething(\"one\" + 1, ...' must not be null")
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -5,7 +5,6 @@ class WithComments/* Some parameter */
|
||||
/**
|
||||
* A very important property
|
||||
*/
|
||||
val veryImportant: Any
|
||||
) {
|
||||
val veryImportant: Any) {
|
||||
|
||||
}
|
||||
Vendored
+2
-4
@@ -2,9 +2,7 @@ annotation class AnnParam
|
||||
|
||||
annotation class AnnProperty
|
||||
|
||||
abstract class WithComposedModifiers(
|
||||
@AnnParam vararg @AnnProperty
|
||||
open val x: String
|
||||
) {
|
||||
abstract class WithComposedModifiers(@AnnParam vararg @AnnProperty
|
||||
open val x: String) {
|
||||
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
return ""
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
return ""
|
||||
})
|
||||
}
|
||||
+3
-5
@@ -1,9 +1,7 @@
|
||||
fun bar(f: (Int, Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
bar(
|
||||
fun(i: Int, j: Int): String {
|
||||
return "$i$j"
|
||||
}
|
||||
)
|
||||
bar(fun(i: Int, j: Int): String {
|
||||
return "$i$j"
|
||||
})
|
||||
}
|
||||
@@ -2,9 +2,7 @@ class Foo
|
||||
fun bar(f: Foo.() -> Unit) {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar(
|
||||
fun Foo.() {
|
||||
bar(fun Foo.() {
|
||||
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
@@ -2,9 +2,7 @@ class Foo
|
||||
fun baz(f: Foo.(i: Int, j: Int) -> Int) {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
baz(
|
||||
fun Foo.(i: Int, j: Int): Int {
|
||||
return i + j
|
||||
}
|
||||
)
|
||||
baz(fun Foo.(i: Int, j: Int): Int {
|
||||
return i + j
|
||||
})
|
||||
}
|
||||
@@ -6,9 +6,7 @@ import java.util.*
|
||||
fun foo(f: () -> ArrayDeque<*>) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(): ArrayDeque<Int> {
|
||||
return ArrayDeque<Int>()
|
||||
}
|
||||
)
|
||||
foo(fun(): ArrayDeque<Int> {
|
||||
return ArrayDeque<Int>()
|
||||
})
|
||||
}
|
||||
|
||||
+3
-5
@@ -6,9 +6,7 @@ import java.util.*
|
||||
fun foo(f: () -> ArrayDeque<*>) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(): ArrayDeque<*> {
|
||||
return ArrayDeque<Int>()
|
||||
}
|
||||
)
|
||||
foo(fun(): ArrayDeque<*> {
|
||||
return ArrayDeque<Int>()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
// comment1
|
||||
return ""
|
||||
// comment2
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
// comment1
|
||||
return ""
|
||||
// comment2
|
||||
})
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
return "$it"
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
return "$it"
|
||||
})
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
if (it == 1) {
|
||||
return "1"
|
||||
}
|
||||
return "$it"
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
if (it == 1) {
|
||||
return "1"
|
||||
}
|
||||
return "$it"
|
||||
})
|
||||
}
|
||||
@@ -1,15 +1,13 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
if (it == 1) {
|
||||
return "1"
|
||||
} else if (it == 2) {
|
||||
return "2"
|
||||
} else {
|
||||
return "$it"
|
||||
}
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
if (it == 1) {
|
||||
return "1"
|
||||
} else if (it == 2) {
|
||||
return "2"
|
||||
} else {
|
||||
return "$it"
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -2,12 +2,10 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
listOf(1).map {
|
||||
return@map 2
|
||||
}
|
||||
return "$it"
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
listOf(1).map {
|
||||
return@map 2
|
||||
}
|
||||
return "$it"
|
||||
})
|
||||
}
|
||||
+4
-6
@@ -1,10 +1,8 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
val b = it == 1
|
||||
return if (b) "1" else "2"
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
val b = it == 1
|
||||
return if (b) "1" else "2"
|
||||
})
|
||||
}
|
||||
+3
-5
@@ -1,9 +1,7 @@
|
||||
fun foo(f: (Int) -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(it: Int): String {
|
||||
return "$it"
|
||||
}
|
||||
)
|
||||
foo(fun(it: Int): String {
|
||||
return "$it"
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
fun main() {
|
||||
Test().foo(
|
||||
fun(it: Int) {
|
||||
Test().foo(fun(it: Int) {
|
||||
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
@@ -3,6 +3,5 @@ fun baz(name: String, f: (Int) -> String) {}
|
||||
fun test() {
|
||||
baz(name = "", f = fun(it: Int): String {
|
||||
return "$it"
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
fun foo(f: () -> String) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(): String {
|
||||
return ""
|
||||
}
|
||||
)
|
||||
foo(fun(): String {
|
||||
return ""
|
||||
})
|
||||
}
|
||||
@@ -3,10 +3,8 @@ fun unit(f: (Int) -> Unit) {}
|
||||
fun foo(i: Int) {}
|
||||
|
||||
fun test() {
|
||||
unit(
|
||||
fun(it: Int) {
|
||||
foo(it)
|
||||
foo(it)
|
||||
}
|
||||
)
|
||||
unit(fun(it: Int) {
|
||||
foo(it)
|
||||
foo(it)
|
||||
})
|
||||
}
|
||||
@@ -7,9 +7,7 @@ data class My(val x: Int)
|
||||
fun foo(f: () -> My) {}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
fun(): My {
|
||||
return My(42)
|
||||
}
|
||||
)
|
||||
foo(fun(): My {
|
||||
return My(42)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(2,
|
||||
{
|
||||
it * 3
|
||||
}
|
||||
)
|
||||
bar(2, {
|
||||
it * 3
|
||||
})
|
||||
}
|
||||
|
||||
fun bar(a: Int, b: (Int) -> Int) {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(
|
||||
b = {
|
||||
it * 3
|
||||
}
|
||||
)
|
||||
bar(b = {
|
||||
it * 3
|
||||
})
|
||||
}
|
||||
|
||||
fun bar(a : Int = 2, b: (Int) -> Int) {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(1,
|
||||
b = {
|
||||
it * 3
|
||||
}
|
||||
)
|
||||
bar(1, b = {
|
||||
it * 3
|
||||
})
|
||||
}
|
||||
|
||||
fun bar(c: Int, a: Int = 2, b: (Int) -> Int) {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(2,
|
||||
{
|
||||
val x = 3
|
||||
it * x
|
||||
}
|
||||
)
|
||||
bar(2, {
|
||||
val x = 3
|
||||
it * x
|
||||
})
|
||||
}
|
||||
|
||||
fun bar(a: Int, b: (Int) -> Int) {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(a = 2,
|
||||
b = {
|
||||
val x = 3
|
||||
it * x
|
||||
}
|
||||
)
|
||||
bar(a = 2, b = {
|
||||
val x = 3
|
||||
it * x
|
||||
})
|
||||
}
|
||||
|
||||
fun bar(a: Int, b: (Int) -> Int) {
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
fun foo(runnable: Runnable) {}
|
||||
|
||||
fun bar(list: List<String>) {
|
||||
foo(
|
||||
Runnable {
|
||||
list.filter(fun (element: String): Boolean {
|
||||
if (element == "a") return false
|
||||
if (element == "b") return@Runnable
|
||||
return true
|
||||
})
|
||||
}
|
||||
)
|
||||
foo(Runnable {
|
||||
list.filter(fun (element: String): Boolean {
|
||||
if (element == "a") return false
|
||||
if (element == "b") return@Runnable
|
||||
return true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
fun foo(runnable: Runnable) {}
|
||||
|
||||
fun bar(p: Int) {
|
||||
foo(
|
||||
Runnable {
|
||||
if (p < 0) return@Runnable
|
||||
println("a")
|
||||
println("b")
|
||||
}
|
||||
)
|
||||
foo(Runnable {
|
||||
if (p < 0) return@Runnable
|
||||
println("a")
|
||||
println("b")
|
||||
})
|
||||
}
|
||||
@@ -5,10 +5,8 @@ import java.io.FilenameFilter
|
||||
fun foo(filter: FilenameFilter) {}
|
||||
|
||||
fun bar() {
|
||||
foo(
|
||||
FilenameFilter { file, name ->
|
||||
if (file.isDirectory) return@FilenameFilter true
|
||||
name == "x"
|
||||
}
|
||||
)
|
||||
foo(FilenameFilter { file, name ->
|
||||
if (file.isDirectory) return@FilenameFilter true
|
||||
name == "x"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,20 +5,18 @@ import java.io.FileFilter
|
||||
fun foo(filter: FileFilter) {}
|
||||
|
||||
fun bar() {
|
||||
foo(
|
||||
FileFilter { file ->
|
||||
val name = file.name
|
||||
if (name.startsWith("a")) {
|
||||
false
|
||||
}
|
||||
else {
|
||||
if (name.endsWith("b"))
|
||||
true
|
||||
else {
|
||||
val l = name.length
|
||||
l > 10
|
||||
}
|
||||
}
|
||||
foo(FileFilter { file ->
|
||||
val name = file.name
|
||||
if (name.startsWith("a")) {
|
||||
false
|
||||
}
|
||||
else {
|
||||
if (name.endsWith("b"))
|
||||
true
|
||||
else {
|
||||
val l = name.length
|
||||
l > 10
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,19 +5,17 @@ import java.io.FileFilter
|
||||
fun foo(filter: FileFilter) {}
|
||||
|
||||
fun bar() {
|
||||
foo(
|
||||
FileFilter { file ->
|
||||
val name = file.name
|
||||
when (name) {
|
||||
"foo" -> true
|
||||
foo(FileFilter { file ->
|
||||
val name = file.name
|
||||
when (name) {
|
||||
"foo" -> true
|
||||
|
||||
"bar" -> false
|
||||
"bar" -> false
|
||||
|
||||
else -> {
|
||||
if (name.startsWith("a")) return@FileFilter true
|
||||
false
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
if (name.startsWith("a")) return@FileFilter true
|
||||
false
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Vendored
+4
-6
@@ -3,10 +3,8 @@
|
||||
import javax.swing.SwingUtilities
|
||||
|
||||
fun bar(p: Int) {
|
||||
SwingUtilities.invokeLater(
|
||||
Runnable {
|
||||
if (p < 0) return@Runnable
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
)
|
||||
SwingUtilities.invokeLater(Runnable {
|
||||
if (p < 0) return@Runnable
|
||||
throw UnsupportedOperationException()
|
||||
})
|
||||
}
|
||||
@@ -5,10 +5,8 @@ import java.io.FileFilter
|
||||
fun foo(filter: FileFilter) {}
|
||||
|
||||
fun bar() {
|
||||
foo(
|
||||
FileFilter { file ->
|
||||
val name = file.name
|
||||
name.startsWith("a")
|
||||
}
|
||||
)
|
||||
foo(FileFilter { file ->
|
||||
val name = file.name
|
||||
name.startsWith("a")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@ interface C {
|
||||
|
||||
class D(val c: C) {
|
||||
fun foo() {
|
||||
this.c/* and this is c */.set(
|
||||
"a", // it's "a"
|
||||
"b" /* and this is "b" */, /* we use 10 */10
|
||||
)
|
||||
this.c/* and this is c */.set("a", // it's "a"
|
||||
"b" /* and this is "b" */, /* we use 10 */10)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-6
@@ -1,9 +1,7 @@
|
||||
fun main() {
|
||||
J().foo(
|
||||
object : J.Sam {
|
||||
override fun bar() {
|
||||
J().foo(object : J.Sam {
|
||||
override fun bar() {
|
||||
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+2
-4
@@ -7,9 +7,7 @@ fun newFun(p1: Int, a: Int, p2: Int, p3: Int, b: Int){}
|
||||
|
||||
|
||||
fun foo() {
|
||||
newFun(
|
||||
0, // 0
|
||||
newFun(0, // 0
|
||||
-1, 1, // 1
|
||||
2, // 2
|
||||
-2
|
||||
)
|
||||
-2)
|
||||
|
||||
+3
-8
@@ -7,12 +7,7 @@ fun newFun(p4: Int, p3: Int, p2: Int, p1: Int, p0: Int){}
|
||||
|
||||
|
||||
fun foo() {
|
||||
newFun(
|
||||
/* 4 */
|
||||
4, 3, 2, // 2
|
||||
/* 1 */
|
||||
1,
|
||||
/* 0 */
|
||||
0
|
||||
)
|
||||
newFun(/* 4 */ 4, 3, 2, // 2
|
||||
/* 1 */ 1,
|
||||
/* 0 */ 0)
|
||||
}
|
||||
|
||||
+1
-2
@@ -8,8 +8,7 @@ interface X {
|
||||
fun newFun(x: X, a: Int, b: Int){}
|
||||
|
||||
fun foo(x: X) {
|
||||
newFun(
|
||||
x/*receiver*/, 1, // pass 1
|
||||
newFun(x/*receiver*/, 1, // pass 1
|
||||
2 // pass 2
|
||||
)
|
||||
}
|
||||
|
||||
+1
-2
@@ -11,6 +11,5 @@ fun foo(x: X) {
|
||||
x.newFun(
|
||||
1,
|
||||
2,
|
||||
0
|
||||
)
|
||||
0)
|
||||
}
|
||||
|
||||
+2
-4
@@ -8,9 +8,7 @@ interface X {
|
||||
}
|
||||
|
||||
fun foo(x: X) {
|
||||
x.<caret>newFun(
|
||||
1,
|
||||
x.<caret>newFun(1,
|
||||
2,
|
||||
3
|
||||
)
|
||||
3)
|
||||
}
|
||||
|
||||
Vendored
+3
-5
@@ -18,9 +18,7 @@ fun useSimple(s: Int): Int {
|
||||
fun println(s: String) {}
|
||||
|
||||
fun useIt() {
|
||||
val t = useSimple(
|
||||
simple {
|
||||
println("abc")
|
||||
}
|
||||
)
|
||||
val t = useSimple(simple {
|
||||
println("abc")
|
||||
})
|
||||
}
|
||||
+1
-2
@@ -36,6 +36,5 @@ fun createHi(any: Any) = "Hi $any"
|
||||
val unDeprecateMe = mutableListOf("Hello").apply {
|
||||
addA(d(::createHi, 1 ) { // Run the quick fix from the IDE and watch it produce broken code.
|
||||
println("Yo")
|
||||
}, Unit
|
||||
)
|
||||
}, Unit)
|
||||
}
|
||||
@@ -3,19 +3,15 @@ fun <caret>foo(a: Int, b: Int, d: Int, c: Int, e: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
1,
|
||||
foo(1,
|
||||
2,
|
||||
4,
|
||||
3,
|
||||
5
|
||||
)
|
||||
foo(
|
||||
1, 2,
|
||||
5)
|
||||
foo(1, 2,
|
||||
4,
|
||||
3,
|
||||
5
|
||||
)
|
||||
5)
|
||||
foo(
|
||||
1,
|
||||
2,
|
||||
|
||||
@@ -3,11 +3,7 @@ fun foo(x: Int, cl: () -> Int, y: Int): Int {
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo(
|
||||
1,
|
||||
{
|
||||
3
|
||||
},
|
||||
2
|
||||
)
|
||||
foo(1, {
|
||||
3
|
||||
}, 2)
|
||||
}
|
||||
+6
-12
@@ -1,24 +1,18 @@
|
||||
interface T {
|
||||
fun foo(
|
||||
a: Int = 1,
|
||||
b: String = "2"
|
||||
)
|
||||
fun foo(a: Int = 1,
|
||||
b: String = "2")
|
||||
}
|
||||
|
||||
open class A: T {
|
||||
override fun foo(
|
||||
a: Int,
|
||||
b: String
|
||||
) {
|
||||
override fun foo(a: Int,
|
||||
b: String) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
class B: A() {
|
||||
override fun foo(
|
||||
a: Int,
|
||||
b: String
|
||||
) {
|
||||
override fun foo(a: Int,
|
||||
b: String) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+2
-4
@@ -3,10 +3,8 @@ fun <caret>foo(b: Int, c: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
2,
|
||||
3
|
||||
)
|
||||
foo(2,
|
||||
3)
|
||||
foo(2, 3)
|
||||
foo(
|
||||
2,
|
||||
|
||||
+2
-4
@@ -3,10 +3,8 @@ fun <caret>foo(a: Int, c: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
1,
|
||||
3
|
||||
)
|
||||
foo(1,
|
||||
3)
|
||||
foo(1, 3)
|
||||
foo(
|
||||
1,
|
||||
|
||||
+2
-4
@@ -3,10 +3,8 @@ fun <caret>foo(a: Int, b: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
1,
|
||||
2
|
||||
)
|
||||
foo(1,
|
||||
2)
|
||||
foo(1, 2)
|
||||
foo(
|
||||
1,
|
||||
|
||||
@@ -3,15 +3,11 @@ fun <caret>foo(c: Int, b: Int, a: Int) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo(
|
||||
3,
|
||||
foo(3,
|
||||
2,
|
||||
1
|
||||
)
|
||||
foo(
|
||||
3, 2,
|
||||
1
|
||||
)
|
||||
1)
|
||||
foo(3, 2,
|
||||
1)
|
||||
foo(
|
||||
3,
|
||||
2,
|
||||
|
||||
+1
-2
@@ -3,6 +3,5 @@ fun callInDefault(simple: List<String> = provideSimple(), complex: List<String>
|
||||
val result = mutableListOf("statement 1")
|
||||
result.add("statement 2")
|
||||
result
|
||||
}
|
||||
) {
|
||||
}) {
|
||||
}
|
||||
+5
-7
@@ -1,8 +1,6 @@
|
||||
fun g() {
|
||||
println(
|
||||
listOf("a", "b").any {
|
||||
if (it.isEmpty()) return@any false
|
||||
it.length < 10
|
||||
}
|
||||
)
|
||||
}
|
||||
println(listOf("a", "b").any {
|
||||
if (it.isEmpty()) return@any false
|
||||
it.length < 10
|
||||
})
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user