diff --git a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
index 8a91f608b6d..6dc2b04ea2f 100644
--- a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
+++ b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
@@ -2,17 +2,17 @@ fun text() {
"direct:a" to "mock:a"
"direct:a" on {it.body == ""} to "mock:a"
"direct:a" on {it -> it.body == ""} to "mock:a"
- bar {1}
- bar {it + 1}
+ bar {1}
+ bar {it + 1}
bar {it, it1 -> it}
bar1 {1}
bar1 {it + 1}
- bar2 {}
+ bar2 {}
bar2 {1}
- bar2 {it}
- bar2 {it -> it}
+ bar2 {it}
+ bar2 {it -> it}
}
fun bar(f : (Int, Int) -> Int) {}
diff --git a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
index 135111a7019..12895c9072d 100644
--- a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
+++ b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
@@ -5,10 +5,10 @@ class A() {
fun f(): Unit {
var x: Int? = 1
x = null
- x + 1
+ x + 1
x plus 1
x < 1
- x += 1
+ x += 1
x == 1
x != 1
@@ -21,7 +21,7 @@ fun f(): Unit {
x === 1
x !== 1
- x..2
+ x..2
x in 1..2
val y : Boolean? = true
diff --git a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
index 9896a869e34..de09d46c20f 100644
--- a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
+++ b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
@@ -1,5 +1,5 @@
fun test() {
- if (x > 0) {
+ if (x > 0) {
}
}
diff --git a/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt b/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
index 5ae410941ce..bf8107c328a 100644
--- a/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
+++ b/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
@@ -15,13 +15,13 @@ val z = 3
fun foo(x: Int = y, y: Int = x, i : Int = z): Int = x + y
-fun foo(x: () -> Int = { y }, y: Int = x(), i : Int = z): Int = x() + y
+fun foo(x: () -> Int = { y }, y: Int = x(), i : Int = z): Int = x() + y
-fun bar(x: () -> Int = { y; 1 }, y: Int) {}
+fun bar(x: () -> Int = { y; 1 }, y: Int) {}
fun baz(
x: () -> Int = {
- fun bar(xx: () -> Int = { y; 1 }) = xx
+ fun bar(xx: () -> Int = { y; 1 }) = xx
bar()()
},
y: Int
@@ -30,7 +30,7 @@ fun baz(
fun boo(
x: () -> Int = {
- fun bar(): Int = y
+ fun bar(): Int = y
bar()
},
y: Int
diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
index f09c9082616..03c630f7405 100644
--- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
+++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
@@ -29,26 +29,26 @@ fun fooT2() : (t : T) -> T {
fun main(args : Array) {
args.foo()()
args.foo1()()
- a.foo1()()
- a.foo1()(a)
+ a.foo1()()
+ a.foo1()(a)
args.foo1()(1)
args.foo1()("1")
- a.foo1()("1")
- a.foo1()(a)
+ a.foo1()("1")
+ a.foo1()(a)
foo2()({})
foo2(){}
(foo2()){}
- (foo2()){x -> }
- foo2()({x -> })
+ (foo2()){x -> }
+ foo2()({x -> })
val a = fooT1(1)()
checkSubtype(a)
val b = fooT2()(1)
checkSubtype(b)
- fooT2()(1) // : Any?
+ fooT2()(1) // : Any?
1()
1{}
@@ -78,7 +78,7 @@ fun main1() {
fun test() {
{x : Int -> 1}();
(fun Int.() = 1)()
- "sd".(fun Int.() = 1)()
+ "sd".(fun Int.() = 1)()
val i : Int? = null
i.(fun Int.() = 1)();
{}()
diff --git a/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt b/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
index a3227ad6bd3..3b6a8a3cf07 100644
--- a/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
+++ b/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
@@ -145,14 +145,14 @@ fun illegalConstantBlock(): String {
return 1
}
fun illegalIfBody(): Int =
- if (1 < 2) 'a' else { 1.0 }
+ if (1 < 2) 'a' else { 1.0 }
fun illegalIfBlock(): Boolean {
if (1 < 2)
return false
else { return 1 }
}
fun illegalReturnIf(): Char {
- return if (1 < 2) 'a' else { 1 }
+ return if (1 < 2) 'a' else { 1 }
}
fun returnNothing(): Nothing {
diff --git a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
index 6628cb9d72f..81c5605959f 100644
--- a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
+++ b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
@@ -13,6 +13,6 @@ class B {
}
class C {
- val bar = test()
- val test = bar()
+ val bar = test()
+ val test = bar()
}
diff --git a/compiler/testData/diagnostics/tests/Nullability.fir.kt b/compiler/testData/diagnostics/tests/Nullability.fir.kt
index 8d5ec364e26..edbc6d50f1a 100644
--- a/compiler/testData/diagnostics/tests/Nullability.fir.kt
+++ b/compiler/testData/diagnostics/tests/Nullability.fir.kt
@@ -145,7 +145,7 @@ fun test() {
out?.println();
val out2 : java.io.PrintStream? = null
-
+
while (out2 == null) {
out2?.println();
out2.println();
diff --git a/compiler/testData/diagnostics/tests/Nullability.kt b/compiler/testData/diagnostics/tests/Nullability.kt
index 3889d2be13c..0bd4db0df4d 100644
--- a/compiler/testData/diagnostics/tests/Nullability.kt
+++ b/compiler/testData/diagnostics/tests/Nullability.kt
@@ -145,10 +145,10 @@ fun test() {
out?.println();
val out2 : java.io.PrintStream? = null
-
+
while (out2 == null) {
out2?.println();
- out2.println();
+ out2.println();
}
out2.println()
diff --git a/compiler/testData/diagnostics/tests/PackageQualified.kt b/compiler/testData/diagnostics/tests/PackageQualified.kt
index 489e40cebc6..4079d93c9c3 100644
--- a/compiler/testData/diagnostics/tests/PackageQualified.kt
+++ b/compiler/testData/diagnostics/tests/PackageQualified.kt
@@ -24,7 +24,7 @@ package foobar.a
// FILE: d.kt
package foobar
-val x1 = a.a
+val x1 = a.a
val x2 = foobar.a.a
val y1 = foobar.a.b
diff --git a/compiler/testData/diagnostics/tests/QualifiedExpressions.kt b/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
index 969ef63c950..95ac6af0932 100644
--- a/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
+++ b/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
@@ -4,8 +4,8 @@ fun test(s: IntRange?) {
val a: Int = s?.start
val b: Int? = s?.start
val c: Int = s?.start ?: -11
- val d: Int = s?.start ?: "empty"
- val e: String = s?.start ?: "empty"
+ val d: Int = s?.start ?: "empty"
+ val e: String = s?.start ?: "empty"
val f: Int = s?.endInclusive ?: b ?: 1
val g: Boolean? = e.startsWith("s")//?.length
}
diff --git a/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt b/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
index c6927a7d29a..b6ca0bf304b 100644
--- a/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
+++ b/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
@@ -4,7 +4,7 @@
package a
val foo = bar()
- fun bar() = foo
+ fun bar() = foo
// FILE: b.kt
package b
diff --git a/compiler/testData/diagnostics/tests/ReserveYield.kt b/compiler/testData/diagnostics/tests/ReserveYield.kt
index c55b07f3b0d..0cffa3afc08 100644
--- a/compiler/testData/diagnostics/tests/ReserveYield.kt
+++ b/compiler/testData/diagnostics/tests/ReserveYield.kt
@@ -19,7 +19,7 @@ fun yield(yield: Int) {
val foo = yield + yield
val foo2 = yield
- bar(yield = 5)
+ bar(yield = 5)
yield(4)
yield {}
diff --git a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
index 337e628f7b6..6d440cd35e6 100644
--- a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
+++ b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
@@ -4,7 +4,7 @@ fun test(a : java.lang.annotation.RetentionPolicy) {
}
fun test() {
- java.util.Collections.emptyList()
+ java.util.Collections.emptyList()
val a : Collection? = java.util.Collections.emptyList()
}
diff --git a/compiler/testData/diagnostics/tests/ResolveToJava.kt b/compiler/testData/diagnostics/tests/ResolveToJava.kt
index 974cd4d6a9b..41451b3c014 100644
--- a/compiler/testData/diagnostics/tests/ResolveToJava.kt
+++ b/compiler/testData/diagnostics/tests/ResolveToJava.kt
@@ -21,10 +21,10 @@ fun test(l : java.util.List) {
val f : java.io.File? = null
- Collections.emptyList
+ Collections.emptyList
Collections.emptyList
Collections.emptyList()
- Collections.emptyList()
+ Collections.emptyList()
checkSubtype?>(Collections.singleton(1))
Collections.singleton(1.0)
diff --git a/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt b/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt
index 613cb02324c..e7644d6e967 100644
--- a/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt
+++ b/compiler/testData/diagnostics/tests/SafeCallUnknownType.kt
@@ -2,5 +2,5 @@ import com.unknownunknown()
- val b = a?.plus(42)
+ val b = a?.plus(42)
}
diff --git a/compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt b/compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt
index 136c64c41d4..9dff6da198f 100644
--- a/compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt
+++ b/compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt
@@ -1,14 +1,13 @@
-
fun getT() {}
fun getTT() {}
fun getTTT(x : Any) {}
fun foo(a : Any?) {}
public fun main() {
- getT<*>()
+ getT<*>()
ggetT<*>()
- getTT<*, *>()
- getTT<*, Int>()
- getTT*>()
- foo(getTTT*, Int>(1))
+ getTT<*, *>()
+ getTT<*, Int>()
+ getTT*>()
+ foo(getTTT*, Int>(1))
}
diff --git a/compiler/testData/diagnostics/tests/TypeInference.kt b/compiler/testData/diagnostics/tests/TypeInference.kt
index ecb0a45bf27..c183d978ee3 100644
--- a/compiler/testData/diagnostics/tests/TypeInference.kt
+++ b/compiler/testData/diagnostics/tests/TypeInference.kt
@@ -9,10 +9,10 @@ fun main() {
val a : C = C();
val x : C = C()
val y : C = C()
- val z : C<*> = C()
+ val z : C<*> = C()
val ba : C = bar();
val bx : C = bar()
val by : C = bar()
- val bz : C<*> = bar()
+ val bz : C<*> = bar()
}
diff --git a/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt b/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
index 8f133360364..bc545469afc 100644
--- a/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
+++ b/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
@@ -1,5 +1,5 @@
import java.util.ArrayList
-@ArrayList(1, 1) fun b() {}
+@ArrayList(1, 1) fun b() {}
@Xoo(x) fun c() {}
@java.lang.Deprecated(x) fun a() {}
diff --git a/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.kt b/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.kt
index 944951ae971..bc172cb6c39 100644
--- a/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.kt
+++ b/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.kt
@@ -12,7 +12,7 @@ annotation class Ann
fun <@Ann R : @Ann Any> f3(a: Array<@Ann R>): Array<@Ann R?> = null!!
fun test2(a: @Ann Array) {
- val r: Array = f3(a)
+ val r: Array = f3(a)
}
@@ -22,4 +22,4 @@ var test3: Int = 0
fun f4(fn: (@Ann Int, @Ann Int) -> Unit) {}
-val test4 = f4 Unit; (Int) -> Unit")!>{ single -> }
+val test4 = f4 Unit; (Int) -> Unit")!>{ single -> }
diff --git a/compiler/testData/diagnostics/tests/annotations/options/functions.kt b/compiler/testData/diagnostics/tests/annotations/options/functions.kt
index 5d1a0dfa987..e414b0ff109 100644
--- a/compiler/testData/diagnostics/tests/annotations/options/functions.kt
+++ b/compiler/testData/diagnostics/tests/annotations/options/functions.kt
@@ -33,7 +33,7 @@ fun foo(arg: Int) {
val f = @FunAnn fun(): Int { return 42 }
// But here, f and gav should be annotated instead
bar(@FunAnn f)
- bar(@FunAnn ::gav)
+ bar(@FunAnn ::gav)
// Function expression, ok
fast(f)
}
diff --git a/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt b/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt
index ffa9d4ec5f2..ff31b52ad0c 100644
--- a/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt
+++ b/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt
@@ -1,4 +1,4 @@
-@Target(AnnotationTarget.FIELD)
+@Target(AnnotationTarget.FIELD)
annotation class Field
@Field
diff --git a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
index 82e14460c33..9db29699fb9 100644
--- a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
+++ b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
@@ -1,4 +1,4 @@
-@Target(AnnotationTarget.FIELD)
+@Target(AnnotationTarget.FIELD)
annotation class Field
@Field
@@ -27,7 +27,7 @@ abstract class My(@Field arg: Int, @Field val w: I
fun foo() {}
@Field
- val v: Int by Delegates.lazy { 42 }
+ val v: Int by Delegates.lazy { 42 }
}
enum class Your {
diff --git a/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.kt b/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.kt
index ac01f082922..a8d28e01d5b 100644
--- a/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.kt
+++ b/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.kt
@@ -11,5 +11,5 @@ class C {
}
fun test(a: C) {
- ")!>a[1] = 25
+ a[1] = 25
}
diff --git a/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.kt b/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.kt
index 1d36df574a1..b105f4c74e2 100644
--- a/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.kt
+++ b/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.kt
@@ -13,5 +13,5 @@ class C {
class Out
fun test(a: C, y: Out) {
- a + ; Out"), TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS{OI}!>y
+ a + ; Out")!>y
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt b/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
index 3da97d10970..2f31e39ee14 100644
--- a/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
@@ -22,7 +22,7 @@ class Test {
val Int.c: Int get() = 42
val test1: () -> Right = a.b<Int>.c::foo
- val test1a: () -> Right = a.b.c::foo
+ val test1a: () -> Right = a.b.c::foo
val test2: () -> Right = a.b<Int>.c?::foo
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/constraintFromLHSWithCorrectDirection.kt b/compiler/testData/diagnostics/tests/callableReference/constraintFromLHSWithCorrectDirection.kt
index 7d33d7349a6..418bc461dce 100644
--- a/compiler/testData/diagnostics/tests/callableReference/constraintFromLHSWithCorrectDirection.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/constraintFromLHSWithCorrectDirection.kt
@@ -18,6 +18,6 @@ fun B.star(p: KProperty1<*, V>): B = TODO()
fun B.test(){
foo(A::bla)
bar(A::bla)
- baz(A::bla)
+ baz(A::bla)
star(A::bla)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.kt b/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.kt
index dcb991c8b1d..3ceb29501a0 100644
--- a/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.kt
@@ -7,6 +7,6 @@ fun takeIt(x: T, f: SubFunction) {}
fun cr() {}
fun test() {
- takeIt(42, ::cr)
- takeIt(42, { })
+ takeIt(42, ::cr)
+ takeIt(42, { })
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt b/compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt
index 8621ecaae83..61306257bb7 100644
--- a/compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt
@@ -1,13 +1,12 @@
-
class A {
fun foo() = T::toString
fun bar() = U::toString
fun baz() {
- take(T::toString)
+ take(T::toString)
- take(U::toString)
+ take(U::toString)
}
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt b/compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt
index 0a242d0617b..75679f80817 100644
--- a/compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt
@@ -17,7 +17,7 @@ fun test2() {
fun foo() {}
Unresolved::foo
- foo(Unresolved::foo)
- foo(Unresolved::unresolved)
+ foo(Unresolved::foo)
+ foo(Unresolved::unresolved)
::unresolved
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/functionReferenceWithDefaultValueAsOtherFunctionType.kt b/compiler/testData/diagnostics/tests/callableReference/functionReferenceWithDefaultValueAsOtherFunctionType.kt
index 334271c468d..ad0711f7944 100644
--- a/compiler/testData/diagnostics/tests/callableReference/functionReferenceWithDefaultValueAsOtherFunctionType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/functionReferenceWithDefaultValueAsOtherFunctionType.kt
@@ -1,4 +1,3 @@
-
fun foo(a: String, b: Int = 5): String {
return a + b
}
@@ -12,6 +11,6 @@ fun bar2(body: (String, Int) -> String): String {
}
fun test() {
- bar1(::foo)
+ bar1(::foo)
bar2(::foo)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
index 2535ec64d81..d1c7611a22a 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
@@ -15,9 +15,9 @@ fun test1() {
bar("", 1, ::foo).checkType { _>() }
bar("", 1, ::fooReturnInt).checkType { _>() }
bar("", 1, ::fooTakeString).checkType { _>() }
- bar("", "", ::fooReturnInt).checkType { _>() }
+ bar("", "", ::fooReturnInt).checkType { _>() }
- val x: String = bar("", "", ::fooReturnInt)
+ val x: String = bar("", "", ::fooReturnInt)
baz(Int::toString, ::foo).checkType { _>() }
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt b/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
index 9d6b98b366c..17e5909d00c 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
@@ -13,12 +13,12 @@ fun Wrapper.baz(transform: (T) -> Unit): T = TODO()
fun test() {
takeFun(::foo)
- takeFun(::fooInt)
+ takeFun(::fooInt)
callFun>(::createWrapper)
callFun>(::createWrapper)
callFun>(::createWrapper)
- callFun>(::createWrapper)
+ callFun>(::createWrapper)
callFun>(::createWrapper).baz(::foo)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
index 6616f4dbc76..d61a59e0f0e 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
@@ -22,8 +22,8 @@ fun test1() {
fun test2() {
bar(Wrapper::fooReturnString).checkType { _>() }
bar(Wrapper::fooReturnString).checkType { _>() }
- bar(Wrapper::fooReturnString)
- bar(Wrapper::fooReturnString)
+ bar(Wrapper::fooReturnString)
+ bar(Wrapper::fooReturnString)
bar(Wrapper::fooTakeInt).checkType { _>() }
bar(Wrapper::fooTakeInt).checkType { _>() }
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
index 626ec1d80aa..a5573ce9a2a 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
@@ -28,9 +28,9 @@ fun test(x: T) {
baz(1, null, ::foo)
baz(null, null, ::foo)
- val s3: Pair = bar(null, null, ::foo)
- val s4: Pair = bar(null, null, ::foo)
+ val s3: Pair = bar(null, null, ::foo)
+ val s4: Pair = bar(null, null, ::foo)
- val s5: Pair = bar(1, "", ::foo)
+ val s5: Pair = bar(1, "", ::foo)
val (a1: Int, b1: String) = bar(1, "", ::foo)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt b/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
index 7ad636cc159..272e268df22 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
@@ -10,7 +10,7 @@ fun test() {
val x2: (Int) -> Unit = baz(id(::foo), ::foo)
val x3: (Int) -> Unit = baz(id(::foo), id(id(::foo)))
val x4: (String) -> Unit = baz(id(::foo), id(id(::foo)))
- val x5: (Double) -> Unit = baz(id(::foo), id(id(::foo)))
+ val x5: (Double) -> Unit = baz(id(::foo), id(id(::foo)))
id<(Int) -> Unit>(id(id(::foo)))
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
index 9fe46e1f2e3..2988960d9d8 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
@@ -16,7 +16,7 @@ fun test1() {
baz(::foo).checkType { _() }
baz(::foo).checkType { _() }
- val b1: Int = baz(::foo)
- val b2: String = baz(::foo)
- val b3: Boolean = baz(::foo)
+ val b1: Int = baz(::foo)
+ val b2: String = baz(::foo)
+ val b3: Boolean = baz(::foo)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
index 700b918ac7a..38ea1c51932 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
@@ -4,9 +4,9 @@ fun test() {
val a1: Array Double> = arrayOf(Double::plus, Double::minus)
val a2: Array Double> = arrayOf(Double::plus, Double::minus)
- val a3: Array Double> = arrayOf(Double::plus, Double::minus)
- val a4: Array Double> = arrayOf(Int::plus, Double::minus)
- val a5: Array Double> = arrayOf(Double::plus, Int::minus)
+ val a3: Array Double> = arrayOf(Double::plus, Double::minus)
+ val a4: Array Double> = arrayOf(Int::plus, Double::minus)
+ val a5: Array Double> = arrayOf(Double::plus, Int::minus)
}
fun foo(x: Int) {}
@@ -17,5 +17,5 @@ fun bar(x: T, f: (T) -> Unit) {}
fun test2() {
bar(1, ::foo)
bar("", ::foo)
- bar(1.0, ::foo)
+ bar(1.0, ::foo)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/kt34314.kt b/compiler/testData/diagnostics/tests/callableReference/kt34314.kt
index 313a17415a1..6a5db993ac9 100644
--- a/compiler/testData/diagnostics/tests/callableReference/kt34314.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/kt34314.kt
@@ -1,5 +1,5 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
fun main() {
- val x = run { ::run } // no error
+ val x = run { ::run } // no error
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.kt b/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.kt
index 79128e96b1b..b5756897634 100644
--- a/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.kt
@@ -3,5 +3,5 @@
fun materialize(): T = TODO()
fun main() {
- val x = run { materialize() }
+ val x = run { materialize() }
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
index 235b087b7f7..024574324f4 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
@@ -7,4 +7,4 @@ fun foo(s: String) {}
val x1 = ofType<() -> Unit>(::foo)
val x2 = ofType<(String) -> Unit>(::foo)
-val x3 = ofType<(Int) -> Unit>(::foo)
+val x3 = ofType<(Int) -> Unit>(::foo)
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
index 96d6a5a58df..88eb11bc693 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
@@ -10,7 +10,7 @@ class Foo {
}
fun foo() {
- installRoute(::route)
+ installRoute(::route)
}
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt
index 372ea53c07e..8b617f86aa8 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt
@@ -8,4 +8,4 @@ fun foo(s: String) {}
val x1 = apply(1, ::foo)
val x2 = apply("hello", ::foo)
-val x3 = apply(true, ::foo)
+val x3 = apply(true, ::foo)
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
index f65d7a52752..4f7067e2012 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
@@ -21,7 +21,7 @@ val x1 = fn1(1, ::foo, ::foo)
val x2 = fn1(1, ::foo, ::bar)
val x3 = fn2(::bar, ::foo)
-val x4 = fn2(::foo, ::bar)
-val x5 = fn2(::foo, ::foo)
+val x4 = fn2(::foo, ::bar)
+val x5 = fn2(::foo, ::foo)
val x6 = fn3(1, ::qux)
diff --git a/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt b/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
index 3f049b5d0aa..8c77793e23e 100644
--- a/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
+++ b/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
@@ -5,7 +5,7 @@ fun runWithoutReturn(r: () -> Unit) = r()
fun testRun() {
run {
1 as Any
- 1 as Any
+ 1 as Any
}
run {
@@ -16,11 +16,11 @@ fun testRun() {
fun foo(): Int = 1
run {
- foo() as Any
+ foo() as Any
}
run {
- (if (true) 1 else 2) as Any
+ (if (true) 1 else 2) as Any
}
run {
@@ -35,17 +35,17 @@ fun testRun() {
}
fun testReturn(): Number {
- run { 1 as Number }
+ run { 1 as Number }
return run { 1 as Number }
}
fun testDependent() {
listOf(1).map {
it as Any
- it as Any
+ it as Any
}
- listOf().map { it as Any? }
+ listOf().map { it as Any? }
}
fun listOf(vararg elements: T): List = TODO()
diff --git a/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt b/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
index 17d4d6122c7..778a3b5be71 100644
--- a/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
+++ b/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
@@ -10,7 +10,7 @@ fun test(x: Int?) {
val a7: Number? = 1 as? Number
run { x as? Int }
- run { x as? Number }
+ run { x as? Number }
foo(x as? Number)
diff --git a/compiler/testData/diagnostics/tests/cast/kt15161.kt b/compiler/testData/diagnostics/tests/cast/kt15161.kt
index e9ffbb9a7fb..597d3c60953 100644
--- a/compiler/testData/diagnostics/tests/cast/kt15161.kt
+++ b/compiler/testData/diagnostics/tests/cast/kt15161.kt
@@ -1,6 +1,6 @@
class Array(e: E) {
val k = Array(1) {
1 as Any
- e as Any?
+ e as Any?
}
}
diff --git a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
index e8341da1a8d..66d6e41d1a5 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
@@ -43,10 +43,10 @@ fun main() {
joinG(1, "2")
joinG(*1, "2")
- joinG(1, *"2")
+ joinG(1, *"2")
joinG(x = 1, a = a)
- joinG(x = 1, a = "2")
- joinG(x = *1, a = *"2")
+ joinG(x = 1, a = "2")
+ joinG(x = *1, a = *"2")
joinG(1, *a)
joinG(1, *a, "3")
joinG(1, "4", *a, "3")
diff --git a/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt b/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
index 812b9bcf085..0625de65475 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
@@ -5,6 +5,6 @@ class A {
operator fun set(x: String, value: Int) {}
fun d(x: Int) {
- this["", 1] = 1
+ this["", 1] = 1
}
}
diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
index 70ed46339a7..7923405f85b 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
@@ -20,7 +20,7 @@ fun test() {
foo("", s = 2)
- foo(i = "", s = 2, 33)
+ foo(i = "", s = 2, 33)
foo("", 1) {}
diff --git a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
index e55a5893fd7..c1b0b78e88d 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
@@ -11,6 +11,6 @@ fun test() {
foo(1, 2)
foo("")
- bar(1, 2)
+ bar(1, 2)
bar()
}
diff --git a/compiler/testData/diagnostics/tests/checkType.kt b/compiler/testData/diagnostics/tests/checkType.kt
index 7940dd064f5..03dc66e2976 100644
--- a/compiler/testData/diagnostics/tests/checkType.kt
+++ b/compiler/testData/diagnostics/tests/checkType.kt
@@ -6,6 +6,6 @@ interface C : B
fun test(b: B) {
b checkType { _() }
- b checkType { _() }
- b checkType { _() }
+ b checkType { _() }
+ b checkType { _() }
}
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
index 4936d9c51cd..b6e772598f0 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
@@ -8,7 +8,7 @@ fun test1() {}
@Foo([], [], [])
fun test2() {}
-@Foo([1f], [' '], [1])
+@Foo([1f], [' '], [1])
fun test3() {}
@Foo(c = [1f], b = [""], a = [1])
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
index 5342e7a0cbb..10fc6a66ae5 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
@@ -20,10 +20,10 @@ fun test3() {}
@Foo([Gen::class])
fun test4() {}
-@Foo([""])
+@Foo([""])
fun test5() {}
-@Foo([Int::class, 1])
+@Foo([Int::class, 1])
fun test6() {}
@Bar
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
index eeec3c94baf..ec3b26925e1 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
@@ -2,11 +2,11 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNSUPPORTED
fun test() {
- val a = []
+ val a = []
val b: Array = []
val c = [1, 2]
val d: Array = [1, 2]
- val e: Array = [1]
+ val e: Array = [1]
val f: IntArray = [1, 2]
val g = [f]
@@ -19,5 +19,5 @@ fun check() {
val f: IntArray = [1]
[f] checkType { _>() }
- [1, ""] checkType { _>() }
+ [1, ""] checkType { _>() }
}
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
index 24e9f0ac5fb..a19abc9c0bc 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
@@ -16,7 +16,7 @@ fun test1_0() {}
@Ann1(*["a", "b"])
fun test1_1() {}
-@Ann1(*["a", 1, null])
+@Ann1(*["a", 1, null])
fun test1_2() {}
@Ann2(*[])
@@ -33,8 +33,8 @@ fun test6() {}
annotation class AnnArray(val a: Array)
-@AnnArray(*["/"])
+@AnnArray(*["/"])
fun testArray() {}
-@Ann1([""])
+@Ann1([""])
fun testVararg() {}
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
index e5e96268466..882d362e46c 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
@@ -7,9 +7,9 @@ annotation class Foo(
)
annotation class Bar(
- val a: Array = [' '],
- val b: Array = ["", ''],
- val c: Array = [1]
+ val a: Array = [' '],
+ val b: Array = ["", ''],
+ val c: Array = [1]
)
annotation class Base(
@@ -21,5 +21,5 @@ annotation class Base(
annotation class Err(
val a: IntArray = [1L],
- val b: Array = [1]
+ val b: Array = [1]
)
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
index 5dbd20eebac..38bbf86fcc5 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
@@ -5,7 +5,7 @@ fun test(): Array {
foo([""])
- val p = [1, 2] + [3, 4]
+ val p = [1, 2] + [3, 4]
return [1, 2]
}
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
index 1c98b0be80a..354d78c5cc7 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
@@ -240,7 +240,7 @@ class Outer() {
}
class ForwardAccessToBackingField() { //kt-147
- val a = a // error
+ val a = a // error
val b = c // error
val c = 1
}
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt
index fc05d4b0315..0477ba5ce3c 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt
@@ -11,16 +11,16 @@ else {
}
val ww = if (true) {
- { true } ?: null!!
+ { true } ?: null!!
}
else if (true) {
- { true } ?: null!!
+ { true } ?: null!!
}
else {
null!!
}
-val n = null ?: (null ?: { true })
+val n = null ?: (null ?: { true })
fun l(): (() -> Boolean)? = null
@@ -33,6 +33,6 @@ val bbb = null ?: ( l() ?: null)
val bbbb = ( l() ?: null) ?: ( l() ?: null)
fun f(x : Long?): Long {
- var a = x ?: (fun() {} ?: fun() {})
- return a
+ var a = x ?: (fun() {} ?: fun() {})
+ return a
}
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
index d4e35c0e1a2..a3d63d00812 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
@@ -1,11 +1,11 @@
// AssertionError for nested ifs with lambdas and Nothing as results
// NI_EXPECTED_FILE
-val fn = if (true) {
- { true }
-}
+val fn = if (true) {
+ { true }
+}
else if (true) {
- { true }
+ { true }
}
else {
null!!
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt b/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
index f392a3bf95f..f8df0a7174a 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
@@ -8,7 +8,7 @@ class None : Option
fun bind(r: Option): Option {
return if (r is Some) {
// Ideally we should infer Option here (see KT-10896)
- (if (true) None() else r) checkType { _