diff --git a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
index b08fa55122f..122e19df15f 100644
--- a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
+++ b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
@@ -3,8 +3,8 @@ 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}
@@ -13,7 +13,7 @@ fun text() {
bar2 {}
bar2 {1}
bar2 {it}
- bar2 {it -> it}
+ bar2 {it -> it}
}
fun bar(f : (Int, Int) -> Int) {}
diff --git a/compiler/testData/diagnostics/tests/Basic.kt b/compiler/testData/diagnostics/tests/Basic.kt
index 97cab674d1a..9f860c46855 100644
--- a/compiler/testData/diagnostics/tests/Basic.kt
+++ b/compiler/testData/diagnostics/tests/Basic.kt
@@ -10,7 +10,7 @@ fun test() : Int {
}
class A() {
- val x : Int = foo1(xx)
+ val x : Int = foo1(xx)
}
fun foo1() {}
diff --git a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
index f52b511ab4c..ca348d66eef 100644
--- a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
+++ b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
@@ -6,10 +6,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
@@ -22,11 +22,11 @@ fun f(): Unit {
x === 1
x !== 1
- x..2
+ x..2
x in 1..2
val y : Boolean? = true
- false || y
- y && true
- y && 1
+ false || y
+ y && true
+ y && 1
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/Bounds.kt b/compiler/testData/diagnostics/tests/Bounds.kt
index d91a22dc5c3..f74e9db347a 100644
--- a/compiler/testData/diagnostics/tests/Bounds.kt
+++ b/compiler/testData/diagnostics/tests/Bounds.kt
@@ -7,12 +7,12 @@ package boundsWithSubstitutors
class C : A()
val a = B()
- val a1 = B<Int>()
+ val a1 = B<Int>()
class X()
val b = X, C>>()
- val b0 = XAny?>()
+ val b0 = XAny?>()
val b1 = X, String>>()
// FILE: b.kt
diff --git a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
index fffe1dd919d..f9620dae68d 100644
--- a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
+++ b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
@@ -1,6 +1,6 @@
// !WITH_NEW_INFERENCE
fun test() {
- if (x > 0) {
+ if (x > 0) {
}
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt b/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
index 1d53a3591c7..e2e2c7cc335 100644
--- a/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
+++ b/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
@@ -1,14 +1,14 @@
// !WITH_NEW_INFERENCE
val x = ""
-fun bar(x : Int = "", y : Int = x, z : String = y) {
+fun bar(x : Int = "", y : Int = x, z : String = y) {
}
// KT-371 Resolve default parameters for constructors
class A(x : Int = y, y : Int = x) { // None of the references is resolved, no types checked
- fun foo(bool: Boolean, a: Int = b, b: String = a) {}
+ fun foo(bool: Boolean, a: Int = b, b: String = a) {}
}
val z = 3
diff --git a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt
index c39ee97049a..c979d34fa4c 100644
--- a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt
+++ b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt
@@ -16,7 +16,7 @@ operator fun String.unaryPlus(): Int = 0
fun test() {
requireInt(+ "")
requireInt(+ Example())
- requireString(+ ExampleDeprecated())
+ requireString(+ ExampleDeprecated())
}
fun requireInt(n: Int) {}
@@ -27,7 +27,7 @@ class Example2 {
operator fun minus() = this
fun test() {
- +this
+ +this
-this
}
}
diff --git a/compiler/testData/diagnostics/tests/EnumEntryAsType.kt b/compiler/testData/diagnostics/tests/EnumEntryAsType.kt
index ff475d00452..383a58c73ec 100644
--- a/compiler/testData/diagnostics/tests/EnumEntryAsType.kt
+++ b/compiler/testData/diagnostics/tests/EnumEntryAsType.kt
@@ -9,7 +9,7 @@ enum class Color {
class MyColor(val x: Color.RED, y: Color.RED) : Color.RED {
- var z: Color.RED = Color.RED
+ var z: Color.RED = Color.RED
set(arg: Color.RED) { z = arg }
fun foo(arg: Color.RED): Color.RED = arg
@@ -17,7 +17,7 @@ class MyColor(val x: Color.RED, y: Color.RED {
class Local : Color.RED
fun local(arg: Color.RED): Color.RED = arg
- val temp: Color.RED = Color.RED
+ val temp: Color.RED = Color.RED
temp as? Color.RED
if (temp is Color.RED) {
return temp as Color.RED
@@ -26,7 +26,7 @@ class MyColor(val x: Color.RED, y: Color.obj is Color.RED) {
return obj
}
- return Color.RED
+ return Color.RED
}
}
diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
index e48130247c2..d2fb5511921 100644
--- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
+++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
@@ -26,13 +26,13 @@ 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(){}
@@ -45,7 +45,7 @@ fun main(args : Array) {
val b = fooT2()(1)
checkSubtype(b)
- fooT2()(1) // : Any?
+ fooT2()(1) // : Any?
1()
1{}
diff --git a/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt b/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
index 55e33e962af..553ac467aff 100644
--- a/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
+++ b/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
@@ -45,7 +45,7 @@ fun intFunctionLiteral(): Int = { 1
fun blockReturnUnitMismatch() : Int {return}
fun blockReturnValueTypeMismatch() : Int {return 3.4}
fun blockReturnValueTypeMatch() : Int {return 1}
-fun blockReturnValueTypeMismatchUnit() : Int {return Unit}
+fun blockReturnValueTypeMismatchUnit() : Int {return Unit}
fun blockAndAndMismatch() : Int {
true && false
@@ -67,7 +67,7 @@ fun blockAndAndMismatch5() : Int {
(return true) || (return false)
}
fun blockReturnValueTypeMatch1() : Int {
- return if (1 > 2) 1.0 else 2.0
+ return if (1 > 2) 1.0 else 2.0
}
fun blockReturnValueTypeMatch2() : Int {
return if (1 > 2) 1
@@ -134,7 +134,7 @@ fun blockNoReturnIfUnitInOneBranch(): Int {
}
}
}
-fun nonBlockReturnIfEmptyIf(): Int = if (1 < 2) {} else {}
+fun nonBlockReturnIfEmptyIf(): Int = if (1 < 2) {} else {}
fun nonBlockNoReturnIfUnitInOneBranch(): Int = if (1 < 2) {} else 2
val a = return 1
@@ -146,14 +146,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 fcc15827204..ec0c1c2124d 100644
--- a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
+++ b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
@@ -13,5 +13,5 @@ class B {
class C {
val bar = test()
- val test = bar()
+ val test = bar()
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/Nullability.kt b/compiler/testData/diagnostics/tests/Nullability.kt
index 63fc4f189b3..a7599f3cd27 100644
--- a/compiler/testData/diagnostics/tests/Nullability.kt
+++ b/compiler/testData/diagnostics/tests/Nullability.kt
@@ -147,7 +147,7 @@ fun test() {
while (out2 == null) {
out2?.println();
- out2.println();
+ out2.println();
}
out2.println()
diff --git a/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt b/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt
index fe2e2ca4e0c..74fb7939f7e 100644
--- a/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt
+++ b/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt
@@ -23,5 +23,5 @@ fun main(args : Array) {
System()
(System)
foo@ System
- null in System
+ null in System
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/PackageQualified.kt b/compiler/testData/diagnostics/tests/PackageQualified.kt
index a0f38399b6b..f37ddce8df4 100644
--- a/compiler/testData/diagnostics/tests/PackageQualified.kt
+++ b/compiler/testData/diagnostics/tests/PackageQualified.kt
@@ -20,7 +20,7 @@ abstract class Foo() {
package foobar.a
import java.util.*
- val b : List? = a
+ val b : List? = a
val b1 : util.List? = a
// FILE: b.kt
diff --git a/compiler/testData/diagnostics/tests/Properties.kt b/compiler/testData/diagnostics/tests/Properties.kt
index 0da9f1cc61b..d954f011eef 100644
--- a/compiler/testData/diagnostics/tests/Properties.kt
+++ b/compiler/testData/diagnostics/tests/Properties.kt
@@ -1,8 +1,10 @@
+// !WITH_NEW_INFERENCE
+
var x : Int = 1 + x
get() : Int = 1
set(value : Long) {
field = value.toInt()
- field = 1.toLong()
+ field = 1.toLong()
}
val xx : Int = 1 + x
diff --git a/compiler/testData/diagnostics/tests/QualifiedExpressions.kt b/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
index 8f213c1601a..5921611129a 100644
--- a/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
+++ b/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
@@ -5,8 +5,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 33f11d4dd12..a14f9dde4d2 100644
--- a/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
+++ b/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
@@ -3,19 +3,19 @@
package a
val foo = bar()
- fun bar() = foo
+ fun bar() = foo
// FILE: f.kt
package b
fun foo() = bar()
- fun bar() = foo()
+ fun bar() = foo()
// FILE: f.kt
package c
fun bazz() = bar()
- fun foo() = bazz()
+ fun foo() = bazz()
fun bar() = foo()
diff --git a/compiler/testData/diagnostics/tests/ReserveYield.kt b/compiler/testData/diagnostics/tests/ReserveYield.kt
index bd7d8aa8bed..42d30817ddf 100644
--- a/compiler/testData/diagnostics/tests/ReserveYield.kt
+++ b/compiler/testData/diagnostics/tests/ReserveYield.kt
@@ -20,7 +20,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 2cfa9bdbbb5..eaae15e42e0 100644
--- a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
+++ b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
@@ -5,7 +5,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 0410c82411a..aff18e7a3e7 100644
--- a/compiler/testData/diagnostics/tests/ResolveToJava.kt
+++ b/compiler/testData/diagnostics/tests/ResolveToJava.kt
@@ -20,10 +20,10 @@ fun test(l : java.util
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/SafeCallInvoke.kt b/compiler/testData/diagnostics/tests/SafeCallInvoke.kt
index 355a8ec4d2a..1aaeaffe446 100644
--- a/compiler/testData/diagnostics/tests/SafeCallInvoke.kt
+++ b/compiler/testData/diagnostics/tests/SafeCallInvoke.kt
@@ -14,7 +14,7 @@ fun foo() {
rule?.apply?.invoke()
// this should be an error
- rule?.apply()
+ rule?.apply()
// these both also ok (with smart cast / unnecessary safe call)
if (rule != null) {
diff --git a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt
index eccc9ecef1c..44d3feb0d78 100644
--- a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt
+++ b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt
@@ -3,5 +3,5 @@ fun Int.gg() = null
fun ff() {
val a: Int = 1
- val b: Int = a?.gg()
+ val b: Int = a?.gg()
}
diff --git a/compiler/testData/diagnostics/tests/TypeInference.kt b/compiler/testData/diagnostics/tests/TypeInference.kt
index e96ab9b2d98..f32d0200af4 100644
--- a/compiler/testData/diagnostics/tests/TypeInference.kt
+++ b/compiler/testData/diagnostics/tests/TypeInference.kt
@@ -10,10 +10,10 @@ fun main(args : Array) {
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()
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/Variance.kt b/compiler/testData/diagnostics/tests/Variance.kt
index 4de5b052a5d..6af79f87cb3 100644
--- a/compiler/testData/diagnostics/tests/Variance.kt
+++ b/compiler/testData/diagnostics/tests/Variance.kt
@@ -8,14 +8,14 @@ abstract class Producer {}
abstract class Usual {}
fun foo(c: Consumer, p: Producer, u: Usual) {
- val c1: Consumer = c
+ val c1: Consumer = c
val c2: Consumer = c1
val p1: Producer = p
- val p2: Producer = p1
+ val p2: Producer = p1
- val u1: Usual = u
- val u2: Usual = u1
+ val u1: Usual = u
+ val u2: Usual = u1
}
//Arrays copy example
diff --git a/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt b/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
index d59acb87d36..944a8b14437 100644
--- a/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
+++ b/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
@@ -1,6 +1,6 @@
// !WITH_NEW_INFERENCE
import java.util.ArrayList
-@ArrayList(1, 1) fun b() {}
+@ArrayList(1, 1) fun b() {}
@Xoo(x) fun c() {}
@java.lang.Deprecated(x) fun a() {}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt b/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
index f329a08dd2f..9dcdb9e9121 100644
--- a/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
+++ b/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
@@ -4,7 +4,7 @@ fun foo(@varargs f : Int) {}
var bar : Int = 1
set(@varargs v) {}
-val x : (Int) -> Int = {@varargs x : Int -> x}
+val x : (Int) -> Int = {@varargs x : Int -> x}
class Hello(@varargs args: Any) {
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt b/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt
index c7fa0c571ee..3f6e31bbe81 100644
--- a/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt
+++ b/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt
@@ -7,7 +7,7 @@ fun foo(@test f : Int) {}
var bar : Int = 1
set(@test v) {}
-val x : (Int) -> Int = {@test x : Int -> x} // todo fix parser annotation on lambda parameter
+val x : (Int) -> Int = {@test x : Int -> x} // todo fix parser annotation on lambda parameter
class Hello(@test args: Any) {
}
diff --git a/compiler/testData/diagnostics/tests/annotations/options/functions.kt b/compiler/testData/diagnostics/tests/annotations/options/functions.kt
index 39f0b1c5507..902aca5dde4 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)
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
index f7ad5897fce..9b99cab215d 100644
--- a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
+++ b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
@@ -28,7 +28,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/callableReference/bound/reservedExpressionSyntax3.kt b/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
index f070ce5c77c..4cb8f15091a 100644
--- a/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
@@ -23,7 +23,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
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt b/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt
index 4f27d448e65..545511d6d28 100644
--- a/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt
@@ -15,5 +15,5 @@ fun take(f: () -> Unit) {}
fun test() {
B::foo checkType { _>() }
- take(B::foo)
+ take(B::foo)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
index 1fc3491945e..480bac1c3df 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
@@ -16,9 +16,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 2a8773369a4..115cc5b6903 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
@@ -14,12 +14,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 406a00ab6c0..1dec1c9ca97 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
@@ -23,8 +23,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 7598300d812..f291e692e14 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
@@ -29,9 +29,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 (a1: Int, b1: String) = bar(1, "", ::foo)
+ val s5: Pair = bar(1, "", ::foo)
+ val (a1: Int, b1: String) = bar(1, "", ::foo)
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt b/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
index 2cddf1299a6..776bf38aabd 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
@@ -11,7 +11,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 03bf4f4a467..8b586533db6 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
@@ -17,7 +17,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)
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
index 74ebc672413..c3ef709da74 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
@@ -5,9 +5,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) {}
@@ -18,5 +18,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/generic/specialCalls.kt b/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt
index cf174a5413b..7427ec827bf 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt
@@ -9,7 +9,7 @@ fun nullableFun(): ((Int) -> Int)? = null
fun test() {
val x1: (Int) -> Int = bar(if (true) ::baz else ::baz)
val x2: (Int) -> Int = bar(nullableFun() ?: ::baz)
- val x3: (Int) -> Int = bar(::baz ?: ::baz)
+ val x3: (Int) -> Int = bar(::baz ?: ::baz)
val i = 0
val x4: (Int) -> Int = bar(when (i) {
diff --git a/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt b/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt
index 26f2448ab03..b12987cf8bb 100644
--- a/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt
@@ -7,5 +7,5 @@ class TestClass(var prop: Int)
open class OtherClass
fun OtherClass.test(prop: KProperty1): Unit = throw Exception()
class OtherClass2: OtherClass() {
- val result = test(TestClass::result)
+ val result = test(TestClass::result)
}
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
index aa9226db750..450d7073b88 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
@@ -8,4 +8,4 @@ fun foo(s: String) {}
val x1 = ofType<() -> Unit>(::foo)
val x2 = ofType<(String) -> Unit>(::foo)
-val x3 = ofType<(Int) -> Unit>(::foo)
\ No newline at end of file
+val x3 = ofType<(Int) -> Unit>(::foo)
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
index a3d0c988b43..e6bb894c11b 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
@@ -11,7 +11,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 33279803ac6..693953125b9 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)
\ No newline at end of file
+val x3 = apply(true, ::foo)
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
index 36c4d95792e..831f3a9652d 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
@@ -20,8 +20,8 @@ fun fn3(i: Int, f: (Int, Int, Int) -> Int): Int = f(i, i, i)
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 x3 = fn2(::bar, ::foo)
+val x4 = fn2(::foo, ::bar)
+val x5 = fn2(::foo, ::foo)
val x6 = fn3(1, ::qux)
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt b/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt
index e99f82e46bd..433edcaa998 100644
--- a/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt
+++ b/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt
@@ -20,11 +20,11 @@ operator fun Impl2.unaryMinus() = Impl2()
// See also KT-10384: in non-error functions, as is necessary!
fun add1(x: Impl2, y: Base): Impl1 = x as Base + y
-fun error1(x: Impl2, y: Base): Impl1 = x + y
+fun error1(x: Impl2, y: Base): Impl1 = x + y
fun add2(x: Base, y: Impl2): Impl1 = x + y as Base
-fun error2(x: Base, y: Impl2): Impl1 = x + y
+fun error2(x: Base, y: Impl2): Impl1 = x + y
fun minus3(x: Impl2): Impl1 = -(x as Base)
diff --git a/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt b/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
index 4aba14b77f2..07734c128ab 100644
--- a/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
+++ b/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
@@ -6,7 +6,7 @@ fun runWithoutReturn(r: () -> Unit) = r()
fun testRun() {
run {
1 as Any
- 1 as Any
+ 1 as Any
}
run {
@@ -17,11 +17,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 {
@@ -36,17 +36,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 b34a1411048..6a5f82470ab 100644
--- a/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
+++ b/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
@@ -11,7 +11,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 85ae68b45ce..dbbaa04a2ce 100644
--- a/compiler/testData/diagnostics/tests/cast/kt15161.kt
+++ b/compiler/testData/diagnostics/tests/cast/kt15161.kt
@@ -2,6 +2,6 @@
class Array(e: E) {
val k = Array(1) {
1 as Any
- e as Any?
+ e as Any?
}
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
index 4d40493000d..9e5c2ddcb98 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
@@ -43,10 +43,10 @@ fun main(args : Array) {
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(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 0f7e0eec970..534666d631c 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
@@ -6,6 +6,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/booleanExpressions.kt b/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt
index ef0b86b1202..65c6b28d2b9 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt
@@ -1,7 +1,7 @@
// !WITH_NEW_INFERENCE
fun foo1(b: Boolean, c: Int) {
- if (b && c) {}
- if (b || c) {}
- if (c && b) {}
- if (c || b) {}
+ if (b && c) {}
+ if (b || c) {}
+ if (c && b) {}
+ if (c || b) {}
}
diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
index b28554c4250..b310e4485ce 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
@@ -25,5 +25,5 @@ fun test() {
foo("", 1) {}
- foo("", 1) {} {}
+ foo("", 1) {} {}
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
index b39c39f0d55..4ebcaa07984 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
@@ -12,6 +12,6 @@ fun test() {
foo(1, 2)
foo("")
- bar(1, 2)
+ bar(1, 2)
bar()
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/checkType.kt b/compiler/testData/diagnostics/tests/checkType.kt
index c6f3d382865..981487c2cba 100644
--- a/compiler/testData/diagnostics/tests/checkType.kt
+++ b/compiler/testData/diagnostics/tests/checkType.kt
@@ -7,6 +7,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 4a44ef45a11..c6f263b033b 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
@@ -9,7 +9,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 22561de60ba..f93f45e4615 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
@@ -21,10 +21,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 99756e64ef9..b75672b70d7 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
@@ -3,11 +3,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]
@@ -20,5 +20,5 @@ fun check() {
val f: IntArray = [1]
[f] checkType { _>() }
- [1, ""] checkType { _>() }
+ [1, ""] checkType { _>() }
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
index 02bff8c55e5..012128a1de3 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
@@ -17,7 +17,7 @@ fun test1_0() {}
@Ann1(*["a", "b"])
fun test1_1() {}
-@Ann1(*["a", 1, null])
+@Ann1(*["a", 1, null])
fun test1_2() {}
@Ann2(*[])
@@ -34,8 +34,8 @@ fun test6() {}
annotation class AnnArray(val a: Array)
-@AnnArray(*["/"])
+@AnnArray(*["/"])
fun testArray() {}
-@Ann1([""])
+@Ann1([""])
fun testVararg() {}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
index 883331c7713..d41d6948ca7 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
@@ -8,9 +8,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(
@@ -22,5 +22,5 @@ annotation class Base(
annotation class Err(
val a: IntArray = [1L],
- val b: Array = [1]
+ val b: Array = [1]
)
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
index d1293f821ff..3d677a29bca 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
@@ -6,7 +6,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 cd8eebbfb56..f05e034c6d9 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
@@ -241,7 +241,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 bfebe75b35d..c49465ae326 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/fieldAsClassDelegate.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt
index 38e94442b8a..3b721d9895d 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt
@@ -28,7 +28,7 @@ private fun lazy(init: () -> T): kotlin.Lazy {
}
object DefaultHttpClientWithBy : HttpClient by client {
- val client by lazy { HttpClientImpl() }
+ val client by lazy { HttpClientImpl() }
}
object DefaultFqHttpClient : HttpClient by DefaultFqHttpClient.client {
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
index 1b3b86cbf64..54d39e6c795 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
@@ -1,11 +1,11 @@
// !WITH_NEW_INFERENCE
// AssertionError for nested ifs with lambdas and Nothing as results
-val fn = if (true) {
- { true }
+val fn = if (true) {
+ { true }
}
else if (true) {
- { true }
+ { true }
}
else {
null!!
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt
index 8709111de38..08216a5ae4b 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt
@@ -8,6 +8,6 @@ fun foo(): String {
}
fun bar(): String {
val x = fn() ?: return ""
- val y = x?.let { throw Exception() } ?: "unreachable"
- return y
+ val y = x?.let { throw Exception() } ?: "unreachable"
+ return y
}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt b/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt
index 419a961aa80..541f8f48c27 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt
@@ -18,5 +18,5 @@ class OtherContainer(val k: K) {
fun test2() {
val other: OtherContainer? = null
// Error
- for (s in other) {}
+ for (s in other) {}
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt b/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
index 63abe881206..0426df66121 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
@@ -9,7 +9,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 { _