diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.fir.txt index 118a68db748..a5f0a67c993 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.fir.txt @@ -7,7 +7,7 @@ FILE: argParamTypeMismatch.kt lval int: R|kotlin/Int| = Int(1) #(R|/int|) #(Int(2)) - #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(20) } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfJavaAnnotation.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfJavaAnnotation.kt index 53f208b8d12..6cc468f8ad9 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfJavaAnnotation.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfJavaAnnotation.kt @@ -9,7 +9,7 @@ public @interface Ann { // FILE: main.kt @Ann(x = 10, s = "") -@Ann(10, "") +@Ann(10, "") @Ann(x = 10, s = "", y = 10) class A diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/default.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/default.kt index b663afc10d8..a107b117ea9 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/default.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/default.kt @@ -21,6 +21,6 @@ fun test() { baz(1, "my", "yours") baz(1, z = true) - baz(0, "", false) + baz(0, "", false) } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/destructuring.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/destructuring.kt index 9bbfc169681..7e2a09e7bb6 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/destructuring.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/destructuring.kt @@ -6,8 +6,8 @@ fun foo2(block: (C, C) -> Unit) = block(C(0, ""), C(0, "")) fun test() { foo1 { (x, y) -> C(x, y) } foo1 { (x: Int, y: String) -> C(x, y) } - foo1 { (x: String, y: Int) -> C(x, y) } + foo1 { (x: String, y: Int) -> C(x, y) } foo2 { (x, y), (z, w) -> C(x + z, y + w) } foo2 { (x: Int, y: String), (z: Int, w: String) -> C(x + z, y + w) } - foo2 { (x: String, y: Int), (z: String, w: Int) -> C(x + z, y + w) } + foo2 { (x: String, y: Int), (z: String, w: Int) -> C(x + z, y + w) } } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.kt index 0aa726d7740..ab2b98af4f4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.kt @@ -17,9 +17,9 @@ fun test_1() { } fun test_2() { - takeInt(10000000000) + takeInt(10000000000) takeLong(10000000000) - takeByte(1000) + takeByte(1000) } fun test_3() { @@ -35,14 +35,14 @@ fun test_4() { } fun test_5() { - takeString(1) - takeString(run { 1 }) + takeString(1) + takeString(run { 1 }) } annotation class Ann(val x: Byte) @Ann(10) fun test_6() { - @Ann(300) + @Ann(300) val x = "" } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/javaAnnotationsWithArrayValue.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/javaAnnotationsWithArrayValue.kt index 836351935b1..e5f808959c1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/javaAnnotationsWithArrayValue.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/javaAnnotationsWithArrayValue.kt @@ -9,7 +9,7 @@ public @interface Ann { @Ann("a", "b") fun test_1() {} -@Ann(arrayOf("a", "b")) +@Ann(arrayOf("a", "b")) fun test_2() {} @Ann(*arrayOf("a", "b")) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/javaArrayVariance.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/javaArrayVariance.kt index 5972c59efdb..30065fc999c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/javaArrayVariance.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/javaArrayVariance.kt @@ -13,6 +13,6 @@ fun takeOutA(array: Array) {} fun test(array: Array) { A.take(array) - takeA(array) + takeA(array) takeOutA(array) } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.kt index 242b333b0a0..b2b537bd106 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.kt @@ -31,33 +31,33 @@ fun test_3() { fun takeByte(b: Byte) {} fun test_4() { - takeByte(1 + 1) - takeByte(1 + 127) - takeByte(1 - 1) - takeByte(-100 - 100) - takeByte(10 * 10) - takeByte(100 * 100) + takeByte(1 + 1) + takeByte(1 + 127) + takeByte(1 - 1) + takeByte(-100 - 100) + takeByte(10 * 10) + takeByte(100 * 100) taleByte(10 / 10) - takeByte(100 % 10) - takeByte(1000 % 10) - takeByte(1000 and 100) - takeByte(128 and 511) - takeByte(100 or 100) - takeByte(1000 or 0) - takeByte(511 xor 511) - takeByte(512 xor 511) + takeByte(100 % 10) + takeByte(1000 % 10) + takeByte(1000 and 100) + takeByte(128 and 511) + takeByte(100 or 100) + takeByte(1000 or 0) + takeByte(511 xor 511) + takeByte(512 xor 511) } fun test_5() { takeByte(-1) takeByte(+1) - takeByte(1.inv()) + takeByte(1.inv()) } fun test_6() { - takeByte(run { 127 + 1 }) - takeByte(1 + run { 1 }) - takeByte(run { 1 + 1 }) + takeByte(run { 127 + 1 }) + takeByte(1 + run { 1 }) + takeByte(run { 1 + 1 }) 1 + 1 run { 1 } 1 + run { 1 } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/simple.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/simple.kt index 38d5c6046a8..18bbb53cdd8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/simple.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/simple.kt @@ -8,10 +8,10 @@ fun test() { foo(third = false, second = 2.71, fourth = "?!", first = 0) foo() - foo(0.0, false, 0, "") + foo(0.0, false, 0, "") foo(1, 2.0, third = true, "") foo(second = 0.0, first = 0, fourth = "") - foo(first = 0.0, second = 0, third = "", fourth = false) + foo(first = 0.0, second = 0, third = "", fourth = false) foo(first = 0, second = 0.0, third = false, fourth = "", first = 1) foo(0, 0.0, false, foth = "") } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/vararg.kt b/compiler/fir/analysis-tests/testData/resolve/arguments/vararg.kt index 3bf7a428880..d37913b1703 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/vararg.kt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/vararg.kt @@ -7,8 +7,8 @@ fun test() { foo(1, "my", "yours") foo(1, *arrayOf("my", "yours")) - foo("") - foo(1, 2) + foo("") + foo(1, 2) bar(1, z = true, y = *arrayOf("my", "yours")) diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/errorCandidates.kt b/compiler/fir/analysis-tests/testData/resolve/callResolution/errorCandidates.kt index bd6a5a00a3e..be7f3df64ad 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/errorCandidates.kt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/errorCandidates.kt @@ -9,7 +9,7 @@ fun bar(x: B) {} fun test(c: C) { // Argument mapping error - foo("") + foo("") // Ambiguity bar(c) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.kt b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.kt index f91d92380d2..6d36b74cadf 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.kt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.kt @@ -72,7 +72,7 @@ fun test_4(x: Any, y: Any) { } ) - takeInt(x) // Bad + takeInt(x) // Bad takeInt(y) // OK takeInt(a) // Bad } diff --git a/compiler/fir/analysis-tests/testData/resolve/delegatingConstructorCall.kt b/compiler/fir/analysis-tests/testData/resolve/delegatingConstructorCall.kt index 237b64d4f3f..b4a312e62e3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/delegatingConstructorCall.kt +++ b/compiler/fir/analysis-tests/testData/resolve/delegatingConstructorCall.kt @@ -16,7 +16,7 @@ class B3_3 : A3("", true) class B3_4 : A3("", Unit) open class A4(val x: Byte) -class B4 : A4( 1 + 1) +class B4 : A4( 1 + 1) open class A5 { constructor(x: Byte) diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/cyclicConstructorDelegationCall.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/cyclicConstructorDelegationCall.kt index 0ff6c499e81..b0386efbaf0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/cyclicConstructorDelegationCall.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/cyclicConstructorDelegationCall.kt @@ -25,7 +25,7 @@ class E { // selection of the proper constructor // but a type mismatch for the first // argument - constructor(e: T, i: Int) : this(i, 10) {} + constructor(e: T, i: Int) : this(i, 10) {} } class I { @@ -33,7 +33,7 @@ class I { // selection of the proper constructor // but a type mismatch for the first // argument - constructor(e: T, i: Int) : this(i, 10) + constructor(e: T, i: Int) : this(i, 10) } class J { diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.kt index bd69a862cac..3803e5b1085 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.kt @@ -7,9 +7,9 @@ class A { class B(other: B = this) class C() { - constructor(x: Int) : this({ + constructor(x: Int) : this({ val a = 10 - this + this }) {} } diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/multipleBounds.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/multipleBounds.kt index 529a97b9729..ee395cf250d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/multipleBounds.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/multipleBounds.kt @@ -62,8 +62,8 @@ fun test2(t : T) t.bar() } -val t1 = test2(A()) -val t2 = test2(C()) +val t1 = test2(A()) +val t2 = test2(C()) val t3 = test2(C()) val x : Int = 0 diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/propertyTypeMismatchOnOverride.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/propertyTypeMismatchOnOverride.kt index 778680b90bd..9f8d1902b4c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/propertyTypeMismatchOnOverride.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/propertyTypeMismatchOnOverride.kt @@ -26,7 +26,7 @@ class GDouble>(val balue: E) : F(balue) { override var rest: E = balue } -class HString>(val balue: E) : F(balue) { +class HString>(val balue: E) : F(balue) { override var rest: E = balue // no report because of INAPPLICABLE_CANDIDATE } diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/returnTypeMismatchOnOverride.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/returnTypeMismatchOnOverride.kt index a6f64235b3b..5e9975af944 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/returnTypeMismatchOnOverride.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/returnTypeMismatchOnOverride.kt @@ -27,7 +27,7 @@ class GDouble>(val balue: E) : F(balue) { override fun rest(): E = balue } -class HString>(val balue: E) : F(balue) { +class HString>(val balue: E) : F(balue) { override fun rest(): E = balue // no report because of INAPPLICABLE_CANDIDATE } diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.fir.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.fir.txt index f7943cccf56..34f05662a1a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.fir.txt @@ -22,7 +22,7 @@ FILE: upperBoundViolated.kt lval b1: R|B| = R|/B.B|() lval b2: R|B| = R|/B.B|() lval b3: R|B| = R|/B.B|() - lval b4: R|B| = R|/B.B|<>() + lval b4: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/B.B|<>().#(ERROR_EXPR(No right operand)).#(#()).#(ERROR_EXPR(No right operand)) lval b5: R|B>| = R|/B.B||>() R|/fest|() R|/fest|() @@ -58,8 +58,8 @@ FILE: upperBoundViolated.kt } public final typealias NL = R|NumColl>| - public final val test7: R|NumColl>| = R|/NumColl.NumColl|() - public get(): R|NumColl>| + public final val test7: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/NumColl.NumColl|().#(ERROR_EXPR(No right operand)) + public get(): R|ERROR CLASS: Unresolved name: NumberPhile| public final val test8: R|NumColl>| = R|/NumColl.NumColl|() public get(): R|NumColl>| public final class NumberPhile : R|kotlin/Any| { @@ -70,5 +70,5 @@ FILE: upperBoundViolated.kt } public final val np1: R|NumberPhile| = R|/NumberPhile.NumberPhile|(Int(10)) public get(): R|NumberPhile| - public final val np2: R|NumberPhile| = #(String(Test)) - public get(): R|NumberPhile| + public final val np2: R|NumberPhile| = #(String(Test)) + public get(): R|NumberPhile| diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt index 82d44bb7e8b..879967259a8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt @@ -14,7 +14,7 @@ fun test() { val b1 = B<Int>() val b2 = B() val b3 = B<Any?>() - val b4 = B<UnexistingType>() + val b4 = B<UnexistingType>()NL<Int>()NumberPhile val b5 = B<B<UnexistingType>>() fest<Boolean>() fest() @@ -40,9 +40,9 @@ fun rest() { class NumColl> typealias NL = NumColl> -val test7 = NL() +val test7 = NL()NumberPhile val test8 = NL() class NumberPhile(x: T) val np1 = NumberPhile(10) -val np2 = NumberPhile("Test") +val np2 = NumberPhile("Test") diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/enumEntryUse.kt b/compiler/fir/analysis-tests/testData/resolve/expresssions/enumEntryUse.kt index a9d5bb7a440..c0687a74c03 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/enumEntryUse.kt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/enumEntryUse.kt @@ -18,5 +18,5 @@ fun test() { useEnum(TestEnum.THIRD) useVararg(TestEnum.FIRST, TestEnum.SECOND) - useVararg(1, 2, 3, 4, 5) + useVararg(1, 2, 3, 4, 5) } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.fir.txt index 72def902fd6..31a39eb0025 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.fir.txt @@ -18,5 +18,5 @@ FILE: typeParameters.kt } public final fun main(fooImpl: R|FooImpl|, bar: R|Bar|): R|kotlin/Unit| { lval a: R|FooImpl| = R|/foo|(R|/fooImpl|) - lval b: R|Bar| = #(R|/bar|) + lval b: R|Foo| = #(R|/bar|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.kt b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.kt index 651ca4c1e6f..7ebefdd94d8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.kt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.kt @@ -7,5 +7,5 @@ fun foo(t: T) = t fun main(fooImpl: FooImpl, bar: Bar) { val a = foo(fooImpl) - val b = foo(bar) + val b = foo(bar) } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters2.kt b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters2.kt index f4bf4ac52f5..2b9db6b8193 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters2.kt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters2.kt @@ -6,6 +6,6 @@ fun foo(t: T) = t fun main(fooImpl: FooImpl, fooBarImpl: FooBarImpl) { - val a = foo(fooBarImpl) + val a = foo(fooBarImpl) val b = foo(fooImpl) } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.fir.txt index 60c1c692117..5c4218a0dd5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.fir.txt @@ -11,7 +11,7 @@ FILE: nullableIntegerLiteralType.kt } } - #(R|/x|) + #(R|/x|) } public final fun test_2(b: R|kotlin/Boolean|, y: R|kotlin/Int|): R|kotlin/Unit| { lval x: R|kotlin/Int?| = when () { @@ -23,5 +23,5 @@ FILE: nullableIntegerLiteralType.kt } } - #(R|/x|) + #(R|/x|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.kt b/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.kt index 14fcd4dd0ff..2f1d982257c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.kt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/nullableIntegerLiteralType.kt @@ -4,10 +4,10 @@ fun takeInt(x: Int) {} fun test_1(b: Boolean) { val x = if (b) 1 else null - takeInt(x) + takeInt(x) } fun test_2(b: Boolean, y: Int) { val x = if (b) y else null - takeInt(x) + takeInt(x) } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/receiverWithCapturedType.kt b/compiler/fir/analysis-tests/testData/resolve/inference/receiverWithCapturedType.kt index 0a52fd88247..1ffb333939d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/receiverWithCapturedType.kt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/receiverWithCapturedType.kt @@ -24,7 +24,7 @@ fun test_1_3(resolvedCall: ResolvedCall) { } fun test_2_1(resolvedCall: ResolvedCall, d: CallableDescriptor) { - val x = resolvedCall.updateD(d) // should fail + val x = resolvedCall.updateD(d) // should fail } fun test_2_2(resolvedCall: ResolvedCall, d: CallableDescriptor) { diff --git a/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypes.kt b/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypes.kt index 6e298256607..c9664810eb3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypes.kt +++ b/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypes.kt @@ -12,10 +12,10 @@ val rr = Outer().Inner() val rrq = Boxed().substitute() fun check() { - accept(Outer().Inner()) // illegal - accept(Outer().Inner()) // illegal + accept(Outer().Inner()) // illegal + accept(Outer().Inner()) // illegal accept(Outer().Inner()) // ok - accept(Boxed().substitute()) // illegal + accept(Boxed().substitute()) // illegal accept(Boxed().substitute()) // ok } diff --git a/compiler/fir/analysis-tests/testData/resolve/kt41984.fir.txt b/compiler/fir/analysis-tests/testData/resolve/kt41984.fir.txt index 733d8d6dfd2..0de2d198e4f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/kt41984.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/kt41984.fir.txt @@ -21,6 +21,6 @@ FILE: main.kt } public final fun test_1(b: R|B|, x: R|kotlin/Int|, inv: R|Inv|): R|kotlin/Unit| { R|/b|.R|SubstitutionOverride|(R|/x|) - R|/b|.#(Null(null)) + R|/b|.#(Null(null)) R|/b|.R|SubstitutionOverride|(R|/inv|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/kt41984.kt b/compiler/fir/analysis-tests/testData/resolve/kt41984.kt index e693f6acce1..51825da4bfa 100644 --- a/compiler/fir/analysis-tests/testData/resolve/kt41984.kt +++ b/compiler/fir/analysis-tests/testData/resolve/kt41984.kt @@ -26,6 +26,6 @@ open class B : A() { fun test_1(b: B, x: Int, inv: Inv) { b.take(x) - b.take(null) + b.take(null) b.takeInv(inv) } diff --git a/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.fir.txt b/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.fir.txt index 01055594087..0ef94536121 100644 --- a/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.fir.txt @@ -24,5 +24,5 @@ FILE: supertypeGenericsComplex.kt } public final fun f(list: R|kotlin/collections/MutableList|, s: R|kotlin/collections/MutableList|): R|kotlin/Unit| { R|/C.C|().R|SubstitutionOverride|(R|/list|, R|/s|) - R|/C.C|().#(R|/s|, R|/list|) + R|/C.C|().#|>(R|/s|, R|/list|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.kt b/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.kt index 5fd73df0428..b8d49b08dc4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.kt +++ b/compiler/fir/analysis-tests/testData/resolve/overrides/supertypeGenericsComplex.kt @@ -10,5 +10,5 @@ class C : Base() fun f(list: MutableList, s: MutableList) { C().f(list, s) - C().f(s, list) + C().f(s, list) } diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt b/compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt index 0230fdf919f..ff5893b19b7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt +++ b/compiler/fir/analysis-tests/testData/resolve/problems/definitelyNotNullAndOriginalType.kt @@ -11,5 +11,5 @@ public interface SLRUMap { // FILE: main.kt fun SLRUMap.getOrPut(value: V) { - takeV(value) + takeV(value) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt index d1533921669..dbd0384b396 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt @@ -14,7 +14,7 @@ FILE: main.kt ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } )) - #(R|/MyFunction||>( = MyFunction@fun (x: R|kotlin/Int|): R|ft| { + #(R|/MyFunction||, R|ft|>( = MyFunction@fun (x: R|kotlin/Int|): R|ft| { ^ R|/x|.R|kotlin/Any.toString|() } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.kt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.kt index dda848e2b85..60bc320c4c2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.kt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.kt @@ -18,9 +18,9 @@ fun main() { x.toInt().toString() }) - foo2(MyFunction { x: Int -> + foo2(MyFunction { x: Int -> x.toString() - }) + }) foo3( MyFunction { x -> diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.kt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.kt index d2426e224ed..fe930323611 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.kt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.kt @@ -10,13 +10,13 @@ fun foo(m: MyRunnable) {} fun MyRunnable(x: (Int) -> Boolean) = 1 fun main() { - foo(MyRunnable { x -> + foo(MyRunnable { x -> x > 1 - }) + }) - foo(MyRunnable({ it > 1 })) + foo(MyRunnable({ it > 1 })) val x = { x: Int -> x > 1 } - foo(MyRunnable(x)) + foo(MyRunnable(x)) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.kt b/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.kt index c4eac6be67d..15623b888e3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.kt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.kt @@ -21,8 +21,8 @@ fun main() { x.toInt().toString() } - JavaUsage.foo2 { x: Int -> - x.toString() + JavaUsage.foo2 { x: Int -> + x.toString() } JavaUsage.foo3( diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.kt b/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.kt index 5fb027ccb83..9993c16eaf8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.kt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.kt @@ -29,11 +29,11 @@ fun main() { foo1 { x -> x > 1 } foo1(f) - foo2 { x -> x > 1 } - foo2(f) + foo2 { x -> x > 1 } + foo2(f) - foo3 { x -> x > 1 } - foo3(f) + foo3 { x -> x > 1 } + foo3(f) foo4 { x -> x > 1 } foo4(f) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.kt b/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.kt index 6235c6e8a92..c9955ff8ac2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.kt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.kt @@ -18,14 +18,14 @@ public class JavaUsage { fun foo(m: MyRunnable) {} fun main() { - JavaUsage.foo { + JavaUsage.foo { x -> - x > 1 + x > 1 } - JavaUsage.foo({ it > 1 }) + JavaUsage.foo({ it > 1 }) val x = { x: Int -> x > 1 } - JavaUsage.foo(x) + JavaUsage.foo(x) } diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt index 1baaf30ee06..81c85d22164 100644 --- a/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.fir.txt @@ -1,6 +1,6 @@ FILE: singleError.kt public final fun foo(x: R|kotlin/String|): R|kotlin/Unit| { } - @R|kotlin/Suppress|(vararg(String(INAPPLICABLE_CANDIDATE))) public final fun bar(): R|kotlin/Unit| { + @R|kotlin/Suppress|(vararg(String(ARGUMENT_TYPE_MISMATCH))) public final fun bar(): R|kotlin/Unit| { #(Int(10)) } diff --git a/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt index d80a4283953..4dbdac633d7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt +++ b/compiler/fir/analysis-tests/testData/resolve/suppress/singleError.kt @@ -1,6 +1,6 @@ fun foo(x: String) {} -@Suppress("INAPPLICABLE_CANDIDATE") +@Suppress("ARGUMENT_TYPE_MISMATCH") fun bar() { foo(10) } diff --git a/compiler/fir/analysis-tests/testData/resolve/typeAliasWithTypeArguments.kt b/compiler/fir/analysis-tests/testData/resolve/typeAliasWithTypeArguments.kt index 15dd68d4062..3bd1b472d05 100644 --- a/compiler/fir/analysis-tests/testData/resolve/typeAliasWithTypeArguments.kt +++ b/compiler/fir/analysis-tests/testData/resolve/typeAliasWithTypeArguments.kt @@ -90,5 +90,5 @@ fun test_7(a: A, inv1: Invariant1, inv2: Invariant1, inv3: Invariant1take(a) + inv3.take(a) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt index e8c12d5cbf3..b56220f6c3b 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KJKComplexHierarchyWithNested.kt @@ -5,9 +5,9 @@ fun main(k: KSub, vString: SuperClass.NestedInSuperClass, vInt: SuperCla k.getImpl().nestedI(vString) // TODO: Support parametrisized inner classes - k.getImpl().nestedI(vInt) + k.getImpl().nestedI(vInt) k.getNestedSubClass().nested("") - k.getNestedSubClass().nested(1) + k.getNestedSubClass().nested(1) } // FILE: J1.java diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameter.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameter.kt index c2256f265e2..3b2fbab2883 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameter.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameter.kt @@ -9,5 +9,5 @@ public class JavaClass { // FILE: K2.kt fun main() { JavaClass.baz(KotlinClass()) - JavaClass.baz("") + JavaClass.baz("") } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.kt index 970b06ffc7e..25fb5fa7862 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/KotlinClassParameterGeneric.kt @@ -10,6 +10,6 @@ public class JavaClass { fun main() { JavaClass.baz(KotlinClass()) JavaClass.baz(KotlinClass()) - JavaClass.baz(KotlinClass()) - JavaClass.baz("") + JavaClass.baz(KotlinClass()) + JavaClass.baz("") } diff --git a/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out b/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out index e6268d3d157..9027f0cc778 100644 --- a/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out +++ b/compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.out @@ -10,9 +10,9 @@ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: unresolv compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context class B(other: B = this) ^ -compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:27: error: inapplicable candidate(s): /C.C - constructor(x: Int) : this({ - ^ +compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: argument type mismatch: actual type is ERROR CLASS: Cannot access '''' before superclass constructor has been called but TypeVariable(_L) was expected + this + ^ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '' before superclass constructor has been called this ^ diff --git a/compiler/testData/diagnostics/tests/AutoCreatedIt.fir.kt b/compiler/testData/diagnostics/tests/AutoCreatedIt.fir.kt index 161b60abe88..4dd88964faa 100644 --- a/compiler/testData/diagnostics/tests/AutoCreatedIt.fir.kt +++ b/compiler/testData/diagnostics/tests/AutoCreatedIt.fir.kt @@ -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.fir.kt b/compiler/testData/diagnostics/tests/Basic.fir.kt index 4aabd12047d..6f7f519ef99 100644 --- a/compiler/testData/diagnostics/tests/Basic.fir.kt +++ b/compiler/testData/diagnostics/tests/Basic.fir.kt @@ -2,9 +2,9 @@ fun foo(u : Unit) : Int = 1 fun test() : Int { - foo(1) + foo(1) val a : () -> Unit = { - foo(1) + foo(1) } return 1 - "1" } diff --git a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt index 34f681b3add..339a7a6219d 100644 --- a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt +++ b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.fir.kt @@ -23,7 +23,7 @@ fun f(): Unit { x !== 1 x..2 - x in 1..2 + x in 1..2 val y : Boolean? = true false || y diff --git a/compiler/testData/diagnostics/tests/Constants.fir.kt b/compiler/testData/diagnostics/tests/Constants.fir.kt index 8570c374394..e925d1b8252 100644 --- a/compiler/testData/diagnostics/tests/Constants.fir.kt +++ b/compiler/testData/diagnostics/tests/Constants.fir.kt @@ -29,25 +29,25 @@ fun test() { checkSubtype(1e5) checkSubtype(1e-5.toFloat()) - checkSubtype(1) - checkSubtype(1) + checkSubtype(1) + checkSubtype(1) 1 as Byte 1 as Int 0xff as Long 1.1 as Int - checkSubtype(1.1) + checkSubtype(1.1) - varargByte(0x77, 1, 3, 200, 0b111) - varargShort(0x777, 1, 2, 3, 200000, 0b111) - varargInt(0x77777777, 0x7777777777, 1, 2, 3, 2000000000, 0b111) + varargByte(0x77, 1, 3, 200, 0b111) + varargShort(0x777, 1, 2, 3, 200000, 0b111) + varargInt(0x77777777, 0x7777777777, 1, 2, 3, 2000000000, 0b111) varargLong(0x777777777777, 1, 2, 3, 200000, 0b111) - varargFloat(1, 1.0, -0.1, 1e4, 1e-4, -1e4) - varargDouble(1, 1.0, -0.1, 1e4, 1e-4, -1e4) + varargFloat(1, 1.0, -0.1, 1e4, 1e-4, -1e4) + varargDouble(1, 1.0, -0.1, 1e4, 1e-4, -1e4) testFun(1.0) - testFun(1.0) + testFun(1.0) testFun(1.0.toFloat()) testFun(1.0.toFloat()) } diff --git a/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt b/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt index 2da4f2f2f99..49e4d905c33 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt +++ b/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt @@ -40,8 +40,8 @@ class Example { var d by CustomDelegate3() fun test() { - requireString(a) - requireString(aval) + requireString(a) + requireString(aval) requireString(b) requireInt(c) requireInt(d) diff --git a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt index 9b208538a2a..199638af940 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt +++ b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.fir.kt @@ -16,7 +16,7 @@ operator fun String.unaryPlus(): Int = 0 fun test() { requireInt(+ "") requireInt(+ Example()) - requireString(+ ExampleDeprecated()) + requireString(+ ExampleDeprecated()) } fun requireInt(n: Int) {} diff --git a/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt b/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt index c51d4d4acf2..40af8425223 100644 --- a/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt +++ b/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt @@ -49,7 +49,7 @@ fun bar(a: Any): T = a as T fun foo() { foo<Color.RED>() foo() - bar<Color.RED>(Color.RED) + bar<Color.RED>(Color.RED) } -fun Array<Color.RED>.foo(entries: Array<Color.RED>): Array<Color.RED> = null!! \ No newline at end of file +fun Array<Color.RED>.foo(entries: Array<Color.RED>): Array<Color.RED> = null!! diff --git a/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt b/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt index 197f060bd67..01e89d765f6 100644 --- a/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/ExtensionCallInvoke.fir.kt @@ -2,6 +2,6 @@ fun bar(doIt: Int.() -> Int) { 1.doIt() 1?.doIt() val i: Int? = 1 - i.doIt() + i.doIt() i?.doIt() } diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt index 7d5eaa6b3aa..0447a576c88 100644 --- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt @@ -33,8 +33,8 @@ fun main(args : Array) { a.foo1()(a) args.foo1()(1) - args.foo1()("1") - a.foo1()("1") + args.foo1()("1") + a.foo1()("1") a.foo1()(a) foo2()({}) diff --git a/compiler/testData/diagnostics/tests/MultipleBounds.fir.kt b/compiler/testData/diagnostics/tests/MultipleBounds.fir.kt index 529a97b9729..ee395cf250d 100644 --- a/compiler/testData/diagnostics/tests/MultipleBounds.fir.kt +++ b/compiler/testData/diagnostics/tests/MultipleBounds.fir.kt @@ -62,8 +62,8 @@ fun test2(t : T) t.bar() } -val t1 = test2(A()) -val t2 = test2(C()) +val t1 = test2(A()) +val t2 = test2(C()) val t3 = test2(C()) val x : Int = 0 diff --git a/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt b/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt index f693a338940..29fce207662 100644 --- a/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt +++ b/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt @@ -28,7 +28,7 @@ fun test(l : java.util.List) { Collections.emptyList() checkSubtype?>(Collections.singleton(1)) - Collections.singleton(1.0) + Collections.singleton(1.0) List diff --git a/compiler/testData/diagnostics/tests/Serializable.fir.kt b/compiler/testData/diagnostics/tests/Serializable.fir.kt index 7654789a46d..6f194a3aa5f 100644 --- a/compiler/testData/diagnostics/tests/Serializable.fir.kt +++ b/compiler/testData/diagnostics/tests/Serializable.fir.kt @@ -36,8 +36,8 @@ fun testLiterals() { } fun testNotSerializable(l: List) { - use(l) - use(N()) + use(l) + use(N()) } enum class C { diff --git a/compiler/testData/diagnostics/tests/Varargs.fir.kt b/compiler/testData/diagnostics/tests/Varargs.fir.kt index 310854f59e0..a4af30dba5b 100644 --- a/compiler/testData/diagnostics/tests/Varargs.fir.kt +++ b/compiler/testData/diagnostics/tests/Varargs.fir.kt @@ -10,7 +10,7 @@ fun test() { v1() v1({}) v1({}, {}) - v1({}, 1, {}) + v1({}, 1, {}) v1({}, {}, {it}) v1({}) {} v1 {} diff --git a/compiler/testData/diagnostics/tests/Variance.fir.kt b/compiler/testData/diagnostics/tests/Variance.fir.kt index 72753b660a2..28aae719b0e 100644 --- a/compiler/testData/diagnostics/tests/Variance.fir.kt +++ b/compiler/testData/diagnostics/tests/Variance.fir.kt @@ -33,9 +33,9 @@ fun copy3(from : Array, to : Array) {} fun copy4(from : Array, to : Array) {} fun f(ints: Array, any: Array, numbers: Array) { - copy1(ints, any) + copy1(ints, any) copy2(ints, any) //ok - copy2(ints, numbers) + copy2(ints, numbers) copy3(ints, numbers) copy4(ints, numbers) //ok } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.fir.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.fir.kt index 07d16e28c0f..a0ce821693b 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.fir.kt @@ -1,10 +1,10 @@ annotation class A1 annotation class A2(val some: Int = 12) -class TopLevelClass<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> { - class InnerClass<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> { +class TopLevelClass<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> { + class InnerClass<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> { fun test() { - class InFun<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> + class InFun<@A1 @A2(3) @A2 @A1(12) @A2("Test") T> } } } diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.fir.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.fir.kt index 02536a4b56a..37fb73fef5c 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.fir.kt @@ -1,12 +1,12 @@ annotation class A1 annotation class A2(val some: Int = 12) -fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> topFun() = 12 +fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> topFun() = 12 class SomeClass { - fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> method() = 12 + fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> method() = 12 fun foo() { - fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> innerFun() = 12 + fun <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> innerFun() = 12 } } diff --git a/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.fir.kt b/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.fir.kt index 06ed2a04db2..1e0c7ae0af2 100644 --- a/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.fir.kt @@ -3,10 +3,10 @@ annotation class A1 annotation class A2(val some: Int = 12) -val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> T.topProp: Int get() = 12 +val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> T.topProp: Int get() = 12 class SomeClass { - val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> T.field: Int get() = 12 + val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> T.field: Int get() = 12 fun foo() { val <@A1 @A2(3) @A2 @A1(12) @A2("Test") T> localVal = 12 diff --git a/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.fir.kt b/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.fir.kt index ccb3633cc31..4bd5c7a754e 100644 --- a/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.fir.kt @@ -1,6 +1,6 @@ package test -@BadAnnotation(1) +@BadAnnotation(1) object SomeObject val some = SomeObject diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_after.fir.kt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_after.fir.kt index 7bdd18f618c..97af855e4e8 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_after.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_after.fir.kt @@ -11,5 +11,5 @@ enum class MyEnum { A } -@AnnE(Test()) +@AnnE(Test()) class Test2 diff --git a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_before.fir.kt b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_before.fir.kt index b583f7a5305..51de2417d88 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_before.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst_before.fir.kt @@ -11,5 +11,5 @@ enum class MyEnum { A } -@AnnE(Test()) +@AnnE(Test()) class Test2 diff --git a/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt b/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt index 18a2fec23fe..aa1e4d17c51 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt @@ -13,7 +13,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) } diff --git a/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.fir.kt b/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.fir.kt index 949c2da42a4..243b003acf3 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.fir.kt @@ -13,7 +13,7 @@ fun foo() { return@l1 103 } - bar @Ann("") { + bar @Ann("") { 104 } } diff --git a/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.fir.kt b/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.fir.kt index ac941a87cd9..46a0216b795 100644 --- a/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.fir.kt @@ -8,7 +8,7 @@ annotation class Ann(val x: Int = 6) @Ann(1) @Ann(2) @Ann(3) private class A @Ann constructor() { @Ann(x = 5) fun foo() { - 1 + @Ann(1) 1 * @Ann("") 6 + 1 + @Ann(1) 1 * @Ann("") 6 @Ann fun local() {} } diff --git a/compiler/testData/diagnostics/tests/annotations/dontReportWarningAboutChangingExecutionOrderForVararg.fir.kt b/compiler/testData/diagnostics/tests/annotations/dontReportWarningAboutChangingExecutionOrderForVararg.fir.kt index 2fa4a8b4483..b1f7ae541cf 100644 --- a/compiler/testData/diagnostics/tests/annotations/dontReportWarningAboutChangingExecutionOrderForVararg.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/dontReportWarningAboutChangingExecutionOrderForVararg.fir.kt @@ -7,7 +7,7 @@ fun foo1() {} @Anno(x = ["a", "b"], y = "a") fun foo2() {} -@Anno(x = arrayOf(arrayOf("a"), arrayOf("b")), y = "a") +@Anno(x = arrayOf(arrayOf("a"), arrayOf("b")), y = "a") fun foo3() {} @Anno(x = arrayOf("a", "b"), y = "a") diff --git a/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.fir.kt b/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.fir.kt index 42f6c83229a..8346964ae3e 100644 --- a/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/rendering/memberProjectedOut.fir.kt @@ -12,5 +12,5 @@ class C { } fun test(a: C) { - a[1] = 25 + a[1] = 25 } diff --git a/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.fir.kt b/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.fir.kt index 53093bc40c4..12eee8e21eb 100644 --- a/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/rendering/typeMismatchDueToTypeProjections.fir.kt @@ -14,5 +14,5 @@ class C { class Out fun test(a: C, y: Out) { - a + y + a + y } diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/companionObject.fir.kt b/compiler/testData/diagnostics/tests/callableReference/bound/companionObject.fir.kt index c14f2527175..0b4350dd405 100644 --- a/compiler/testData/diagnostics/tests/callableReference/bound/companionObject.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/bound/companionObject.fir.kt @@ -28,10 +28,10 @@ fun test() { checkSubtype<() -> String>(r4) val r5 = (C)::foo - checkSubtype<() -> String>(r5) + checkSubtype<() -> String>(r5) val r6 = (test.C)::foo - checkSubtype<() -> String>(r6) + checkSubtype<() -> String>(r6) val c = C.Companion val r7 = c::foo diff --git a/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.fir.kt b/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.fir.kt index b271e0ba01a..411505e1fcc 100644 --- a/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/expectedTypeAsSubtypeOfFunctionType.fir.kt @@ -9,5 +9,5 @@ fun cr() {} fun test() { takeIt(42, ::cr) - takeIt(42, { }) + takeIt(42, { }) } diff --git a/compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.fir.kt b/compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.fir.kt index f2dac1b0c43..99a315c4f5a 100644 --- a/compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.fir.kt @@ -13,5 +13,5 @@ class B : A() { fun test() { B::foo checkType { _>() } - (B::hashCode)("No.") + (B::hashCode)("No.") } diff --git a/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.fir.kt b/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.fir.kt index f7eb0039da3..20060820bfa 100644 --- a/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.fir.kt @@ -12,16 +12,16 @@ fun foo(): String = "" class A { fun foo() {} - + fun main() { val x = ::foo checkSubtype>(x) expectFunction0Unit(x) - expectFunction0String(x) - expectFunction1Unit(x) - expectFunction1String(x) + expectFunction0String(x) + expectFunction1Unit(x) + expectFunction1String(x) expectFunction0Unit(::foo) expectFunction0String(::foo) diff --git a/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt b/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt index 8d1f5558aa6..8e24a7c6111 100644 --- a/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt +++ b/compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt @@ -12,7 +12,7 @@ fun foo(): String = "" class A { fun foo() {} - + fun main() { val x = ::foo diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt index 092be2981f6..f8504fe88f0 100644 --- a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt @@ -23,8 +23,8 @@ fun test(x: T) { baz(null, null, ::foo) - baz(null, null, ::foo) - baz(null, null, ::foo) + baz(null, null, ::foo) + baz(null, null, ::foo) baz(null, "", ::foo) baz(1, null, ::foo) baz(null, null, ::foo) diff --git a/compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.fir.kt b/compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.fir.kt index 4a0a3b0b4c2..8d2a0f86741 100644 --- a/compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.fir.kt @@ -22,15 +22,15 @@ fun test() { val base = Base::x checkSubtype>(base) checkSubtype(base.get(A())) - checkSubtype(base.get(B())) - checkSubtype(base.get(C())) + checkSubtype(base.get(B())) + checkSubtype(base.get(C())) val a = A::x checkSubtype>(a) checkSubtype(a.get(A())) - checkSubtype(a.get(B())) + checkSubtype(a.get(B())) val b = B::x checkSubtype>(b) - checkSubtype(b.get(C())) + checkSubtype(b.get(C())) } diff --git a/compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.fir.kt b/compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.fir.kt index f48a550a72e..a3441dde4ca 100644 --- a/compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.fir.kt @@ -13,7 +13,7 @@ fun test() { val f = String::countCharacters checkSubtype>(f) - checkSubtype>(f) + checkSubtype>(f) checkSubtype(f.get("abc")) f.set("abc", 0) diff --git a/compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.fir.kt b/compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.fir.kt index 8c32de43108..7f8ed220694 100644 --- a/compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.fir.kt @@ -11,7 +11,7 @@ fun test() { val p = A::foo checkSubtype>(p) - checkSubtype>(p) + checkSubtype>(p) checkSubtype(p.get(A())) p.get() p.set(A(), 239) diff --git a/compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.fir.kt b/compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.fir.kt index cff6bfaaf0b..d112e5971e2 100644 --- a/compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.fir.kt @@ -20,9 +20,9 @@ fun testX() { fun testY() { val yy = ::y - checkSubtype>(yy) + checkSubtype>(yy) checkSubtype>(yy) - checkSubtype>(yy) + checkSubtype>(yy) checkSubtype>(yy) checkSubtype>(yy) diff --git a/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.fir.kt b/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.fir.kt index 09e12b59bcb..b035f0012a6 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.fir.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.fir.kt @@ -6,5 +6,5 @@ interface G fun test(tr: Tr) { val v = tr as G? // If v is not nullable, there will be a warning on this line: - checkSubtype>(v!!) + checkSubtype>(v!!) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/cast/bare/FromErrorType.fir.kt b/compiler/testData/diagnostics/tests/cast/bare/FromErrorType.fir.kt index 32da7c8aecb..7dc989eb0a6 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/FromErrorType.fir.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/FromErrorType.fir.kt @@ -4,5 +4,5 @@ class G fun foo(p: P) { val v = p as G? - checkSubtype>(v!!) + checkSubtype>(v!!) } diff --git a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.fir.kt b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.fir.kt index e28e2ab748d..d60e629c112 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.fir.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.fir.kt @@ -5,5 +5,5 @@ interface G fun test(tr: Tr?) { val v = tr as G - checkSubtype>(v) -} \ No newline at end of file + checkSubtype>(v) +} diff --git a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.fir.kt b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.fir.kt index 43ed0729518..a4c197e79af 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.fir.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.fir.kt @@ -5,5 +5,5 @@ interface G fun test(tr: Tr?) { val v = tr as G? - checkSubtype>(v!!) -} \ No newline at end of file + checkSubtype>(v!!) +} diff --git a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.fir.kt b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.fir.kt index 54347639674..10897001912 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.fir.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.fir.kt @@ -5,5 +5,5 @@ interface G fun test(tr: Tr) { val v = tr as G - checkSubtype>(v) -} \ No newline at end of file + checkSubtype>(v) +} diff --git a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.fir.kt b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.fir.kt index 10a098124b5..3e0312ceab2 100644 --- a/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.fir.kt +++ b/compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.fir.kt @@ -4,4 +4,4 @@ interface Tr interface G -fun test(tr: Tr) = checkSubtype<G>(tr) \ No newline at end of file +fun test(tr: Tr) = checkSubtype<G>(tr) diff --git a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.fir.kt b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.fir.kt index 49eac651e55..2d63d3da046 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.fir.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.fir.kt @@ -11,27 +11,27 @@ fun main() { join(1, "2") join(1, "2", "3") join(*1, "2") - join(1, *"2") + join(1, *"2") join(x = 1, a = "2") join(x = *1, a = *"2") join(x = 1, a = a) - join(x = 1, a = b) + join(x = 1, a = b) join(1, *a) - join(1, *b) + join(1, *b) join(1, *a, "3") - join(1, *b, "3") + join(1, *b, "3") join(1, "4", *a, "3") - join(1, "4", *b, "3") + join(1, "4", *b, "3") join(1, "4", *a) join(1, "4", *a, *a, "3") - join(1, "4", *a, *b, "3") + join(1, "4", *a, *b, "3") join(a = a, x = 1) - join(a = b, x = 1) + join(a = b, x = 1) join(a = a, x = 1) 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") @@ -44,7 +44,7 @@ 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") diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.fir.kt b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.fir.kt index 49e6d2c1c1e..443337ad83c 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.fir.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.fir.kt @@ -17,9 +17,9 @@ fun test() { foo(r = xx, i = "", s = "") - foo(i = 1, i = 1, s = 11) + foo(i = 1, i = 1, s = 11) - foo("", s = 2) + foo("", s = 2) foo(i = "", s = 2, 33) diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.txt b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.txt index c772849ebbb..c29b7ff5ec1 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.txt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.txt @@ -5,3 +5,4 @@ package a { public fun foo(/*0*/ i: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit public fun test(): kotlin.Unit } + diff --git a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.fir.kt b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.fir.kt index ae8211a85f7..708ebb6df78 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.fir.kt @@ -10,7 +10,7 @@ fun bar(a: Int) {} fun test() { foo(1, 2) - foo("") + foo("") bar(1, 2) bar() diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt1075.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/kt1075.fir.kt index 467ad06f857..811be4565f0 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/kt1075.fir.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/kt1075.fir.kt @@ -4,9 +4,9 @@ package kt1075 //KT-1075 No type check for 'in range' condition in 'when' expression fun foo(b: String) { - if (b in 1..10) {} //type mismatch + if (b in 1..10) {} //type mismatch when (b) { - in 1..10 -> 1 //no type mismatch, but it should be here + in 1..10 -> 1 //no type mismatch, but it should be here else -> 2 } } diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.fir.kt b/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.fir.kt index 2aa1d500c0d..87589398a2f 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.fir.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.fir.kt @@ -105,11 +105,11 @@ fun testImplicitCoercion() { val g = if (true) 4 val h = if (false) 4 else {} - bar(if (true) { + bar(if (true) { 4 } else { z = 342 - }) + }) } fun fooWithAnyArg(arg: Any) {} diff --git a/compiler/testData/diagnostics/tests/dataFlow/EmptyIf.fir.kt b/compiler/testData/diagnostics/tests/dataFlow/EmptyIf.fir.kt index 71a28eb64f4..cb03e48686e 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/EmptyIf.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/EmptyIf.fir.kt @@ -7,14 +7,14 @@ fun f1(s: String?) { fun f2(s: Number?) { if (s is Int); - checkSubtype(s) + checkSubtype(s) if (s as Int == 42); checkSubtype(s) } fun f3(s: Number?) { if (s is Int && s as Int == 42); - checkSubtype(s) + checkSubtype(s) } fun f4(s: Int?) { diff --git a/compiler/testData/diagnostics/tests/dataFlow/IsExpression.fir.kt b/compiler/testData/diagnostics/tests/dataFlow/IsExpression.fir.kt index 3ede29e6027..13cefbe0141 100644 --- a/compiler/testData/diagnostics/tests/dataFlow/IsExpression.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlow/IsExpression.fir.kt @@ -1,6 +1,6 @@ fun f(a: Boolean, b: Int) {} fun foo(a: Any) { - f(a is Int, a) + f(a is Int, a) 1 + a } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.fir.kt index 77c6d0b1f6d..280af4e640d 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.fir.kt @@ -5,9 +5,9 @@ fun foo() { val x: Int? = null if (x != null && bar(x) == 0) bar(bar(x)) - bar(x) - if (x == null || bar(x) == 0) bar(bar(x)) - bar(x) + bar(x) + if (x == null || bar(x) == 0) bar(bar(x)) + bar(x) if (x is Int && bar(x)*bar(x) == bar(x)) bar(x) - bar(x) + bar(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.fir.kt index acd4e6f6036..4280bac11f5 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.fir.kt @@ -4,10 +4,10 @@ fun foo() { val x: Int? = null val a = Array(3, {0}) - if (x != null) bar(a[x]) else bar(a[x]) + if (x != null) bar(a[x]) else bar(a[x]) bar(a[if (x == null) 0 else x]) - bar(a[x]) - - "123"[x]; + bar(a[x]) + + "123"[x]; if (x != null) "123"[x]; } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt index 40d2733bbdb..6b5ac5a4100 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt @@ -7,7 +7,7 @@ fun foo() { if (x != null) bar(a[x]) else bar(a[x]) bar(a[if (x == null) 0 else x]) bar(a[x]) - + "123"[x]; if (x != null) "123"[x]; } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.fir.kt index 8186fa93023..d78990199bb 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.fir.kt @@ -6,6 +6,6 @@ fun foo() { val x: Int? = null bar(1 + (if (x == null) 0 else x)) - bar(if (x == null) x else x) + bar(if (x == null) x else x) if (x != null) bar(x + x/(x-x*x)) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.fir.kt index 6dcd58c1a3d..be24dab7e4b 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.fir.kt @@ -2,7 +2,7 @@ fun foo1(x: Number, cond: Boolean): Boolean { val result = cond && ((x as Int) == 42) - checkSubtype(x) + checkSubtype(x) return result } @@ -14,7 +14,7 @@ fun foo2(x: Number, cond: Boolean): Boolean { fun foo3(x: Number, cond: Boolean): Boolean { val result = cond || ((x as Int) == 42) - checkSubtype(x) + checkSubtype(x) return result } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.fir.kt index 395d4b3ded5..f9b849dfa4c 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.fir.kt @@ -11,6 +11,6 @@ fun elvis(x: Number?): Int { fun elvisWithRHSTypeInfo(x: Number?): Any? { val result = x ?: x!! - checkSubtype(x) + checkSubtype(x) return result } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt index f9453268461..088ac49ad83 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt @@ -17,14 +17,14 @@ fun foo() { if (x == null) bar(x) else bar(x) bar(bar(x)) } else if (x == null) { - bar(x) + bar(x) if (x != null) { bar(x) if (x == null) bar(x) if (x == null) bar(x) else bar(x) bar(bar(x) + bar(x)) } else if (x == null) { - bar(x) + bar(x) } } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.fir.kt index 6f47bde260d..340e88326c9 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.fir.kt @@ -4,13 +4,13 @@ fun foo() { val x: Int? = null do { - bar(x) + bar(x) } while (x == null) bar(x) - + val y: Int? = null do { - bar(y) + bar(y) } while (y != null) - bar(y) + bar(y) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt index 01de3666935..8143f9f68c6 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt @@ -7,7 +7,7 @@ fun foo() { bar(x) } while (x == null) bar(x) - + val y: Int? = null do { bar(y) diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.fir.kt index 86b63f4d258..9ccfda71690 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.fir.kt @@ -16,5 +16,5 @@ fun doWhileWithBreak(x: Int?, y0: Int) { y++ if (y > 0) break } while (x!! == y) - checkSubtype(x) + checkSubtype(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.fir.kt index f7042dc5e38..18b3858584e 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.fir.kt @@ -5,5 +5,5 @@ fun foo() { bar(x ?: 0) if (x != null) bar(x ?: x) - bar(x) + bar(x) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.fir.kt index 02ddbc32ee5..0a7f2140faf 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.fir.kt @@ -1,23 +1,23 @@ fun bar(x: Int) = x + 1 fun f1(x: Int?) { - bar(x) + bar(x) if (x != null) bar(x!!) if (x == null) bar(x!!) } -fun f2(x: Int?) { +fun f2(x: Int?) { if (x != null) else x!! } -fun f3(x: Int?) { +fun f3(x: Int?) { if (x != null) bar(x!!) else x!! } - -fun f4(x: Int?) { + +fun f4(x: Int?) { if (x == null) x!! else bar(x!!) } -fun f5(x: Int?) { +fun f5(x: Int?) { if (x == null) else bar(x!!) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt index 7a28dad77a9..db6d32f7d0b 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt @@ -6,18 +6,18 @@ fun f1(x: Int?) { if (x == null) bar(x!!) } -fun f2(x: Int?) { +fun f2(x: Int?) { if (x != null) else x!! } -fun f3(x: Int?) { +fun f3(x: Int?) { if (x != null) bar(x!!) else x!! } - -fun f4(x: Int?) { + +fun f4(x: Int?) { if (x == null) x!! else bar(x!!) } -fun f5(x: Int?) { +fun f5(x: Int?) { if (x == null) else bar(x!!) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt index 5463fe9bafe..a952d89a860 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt @@ -5,7 +5,7 @@ fun foo() { val a = Array(3, {0}) for (p in a) { - bar(x) + bar(x) if (x == null) continue bar(x) for (q in a) { @@ -15,7 +15,7 @@ fun foo() { } for (p in a) { - bar(x) + bar(x) if (x == null) break bar(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.fir.kt index 9b732f1e2ab..1ea15be97b5 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.fir.kt @@ -3,7 +3,7 @@ fun bar(x: Int) = x + 1 fun foo() { val x: Int? = null - fun baz() = bar(x) + fun baz() = bar(x) fun quux() = if (x != null) bar(x) else baz() fun quuux() = bar(if (x == null) 0 else x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.fir.kt index a3e32d13887..819a5590836 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.fir.kt @@ -25,7 +25,7 @@ fun ifThenElse(x: Int?) { fun ifIs(x: Int?, cond: Boolean) { if ((x is Int) == cond) { - checkSubtype(x) + checkSubtype(x) } - checkSubtype(x) + checkSubtype(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.fir.kt index ab045d4abcc..ba5755eb913 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.fir.kt @@ -6,7 +6,7 @@ fun foo() { bar(if (x == null) 0 else x) if (x == null) { - bar(x) + bar(x) return } else { bar(x) @@ -17,14 +17,14 @@ fun foo() { if (y is Int) { bar(y) } else { - bar(y) + bar(y) return } bar(y) val z: Int? = null if (z != null) bar(z) - bar(z) + bar(z) bar(z!!) if (z != null) bar(z!!) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.fir.kt index 4c5495cd267..74f13d8954f 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.fir.kt @@ -3,7 +3,7 @@ fun bar(x: Int): Int = x + 1 fun foo() { val x: Int? = null - bar(x) + bar(x) if (x != 2) { if (x == null) return 2+ diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.fir.kt index e74aec692cc..4f0f723d8e8 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.fir.kt @@ -16,17 +16,17 @@ fun dataFlowInfoAnd(a: Array) { if (a[15] is Int) { if (a[16] is Int) { if (a[17] is Int) { if (a[18] is Int) { if (a[19] is Int) { if (a[20] is Int) { if (a[21] is Int) { if (a[22] is Int) { if (a[23] is Int) { if (a[24] is Int) { if (a[25] is Int) { if (a[26] is Int) { if (a[27] is Int) { if (a[28] is Int) { if (a[29] is Int) { - checkSubtype(a[0]) + checkSubtype(a[0]) } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } fun dataFlowInfoOr(a: Array) { - if (a[0] is Int || a[1] is Int || a[2] is Int || a[3] is Int || a[4] is Int || a[5] is Int || a[6] is Int || a[7] is Int || a[8] is Int || a[9] is Int || - a[10] is Int || a[11] is Int || a[12] is Int || a[13] is Int || a[14] is Int || a[15] is Int || a[16] is Int || a[17] is Int || a[18] is Int || a[19] is Int || - a[20] is Int || a[21] is Int || a[22] is Int || a[23] is Int || a[24] is Int || a[25] is Int || a[26] is Int || a[27] is Int || a[28] is Int || a[29] is Int || - a[30] is Int || a[31] is Int || a[32] is Int || a[33] is Int || a[34] is Int || a[35] is Int || a[36] is Int || a[37] is Int || a[38] is Int || a[39] is Int || - a[40] is Int || a[41] is Int || a[42] is Int || a[43] is Int || a[44] is Int || a[45] is Int || a[46] is Int || a[47] is Int || a[48] is Int || a[49] is Int || + if (a[0] is Int || a[1] is Int || a[2] is Int || a[3] is Int || a[4] is Int || a[5] is Int || a[6] is Int || a[7] is Int || a[8] is Int || a[9] is Int || + a[10] is Int || a[11] is Int || a[12] is Int || a[13] is Int || a[14] is Int || a[15] is Int || a[16] is Int || a[17] is Int || a[18] is Int || a[19] is Int || + a[20] is Int || a[21] is Int || a[22] is Int || a[23] is Int || a[24] is Int || a[25] is Int || a[26] is Int || a[27] is Int || a[28] is Int || a[29] is Int || + a[30] is Int || a[31] is Int || a[32] is Int || a[33] is Int || a[34] is Int || a[35] is Int || a[36] is Int || a[37] is Int || a[38] is Int || a[39] is Int || + a[40] is Int || a[41] is Int || a[42] is Int || a[43] is Int || a[44] is Int || a[45] is Int || a[46] is Int || a[47] is Int || a[48] is Int || a[49] is Int || a[50] is Int || a[51] is Int || a[52] is Int || a[53] is Int || a[54] is Int || a[55] is Int || a[56] is Int || a[57] is Int || a[58] is Int || a[59] is Int) { - checkSubtype(a[0]) + checkSubtype(a[0]) } } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt index 7d45bc9e2e1..a497be4a279 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt @@ -21,11 +21,11 @@ fun dataFlowInfoAnd(a: Array) { } fun dataFlowInfoOr(a: Array) { - if (a[0] is Int || a[1] is Int || a[2] is Int || a[3] is Int || a[4] is Int || a[5] is Int || a[6] is Int || a[7] is Int || a[8] is Int || a[9] is Int || - a[10] is Int || a[11] is Int || a[12] is Int || a[13] is Int || a[14] is Int || a[15] is Int || a[16] is Int || a[17] is Int || a[18] is Int || a[19] is Int || - a[20] is Int || a[21] is Int || a[22] is Int || a[23] is Int || a[24] is Int || a[25] is Int || a[26] is Int || a[27] is Int || a[28] is Int || a[29] is Int || - a[30] is Int || a[31] is Int || a[32] is Int || a[33] is Int || a[34] is Int || a[35] is Int || a[36] is Int || a[37] is Int || a[38] is Int || a[39] is Int || - a[40] is Int || a[41] is Int || a[42] is Int || a[43] is Int || a[44] is Int || a[45] is Int || a[46] is Int || a[47] is Int || a[48] is Int || a[49] is Int || + if (a[0] is Int || a[1] is Int || a[2] is Int || a[3] is Int || a[4] is Int || a[5] is Int || a[6] is Int || a[7] is Int || a[8] is Int || a[9] is Int || + a[10] is Int || a[11] is Int || a[12] is Int || a[13] is Int || a[14] is Int || a[15] is Int || a[16] is Int || a[17] is Int || a[18] is Int || a[19] is Int || + a[20] is Int || a[21] is Int || a[22] is Int || a[23] is Int || a[24] is Int || a[25] is Int || a[26] is Int || a[27] is Int || a[28] is Int || a[29] is Int || + a[30] is Int || a[31] is Int || a[32] is Int || a[33] is Int || a[34] is Int || a[35] is Int || a[36] is Int || a[37] is Int || a[38] is Int || a[39] is Int || + a[40] is Int || a[41] is Int || a[42] is Int || a[43] is Int || a[44] is Int || a[45] is Int || a[46] is Int || a[47] is Int || a[48] is Int || a[49] is Int || a[50] is Int || a[51] is Int || a[52] is Int || a[53] is Int || a[54] is Int || a[55] is Int || a[56] is Int || a[57] is Int || a[58] is Int || a[59] is Int) { checkSubtype(a[0]) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.fir.kt index 7882754d287..467920710ec 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.fir.kt @@ -7,7 +7,7 @@ class A { fun foo() { val x: Int? = null - A().bar(x) + A().bar(x) if (x == null) return A().bar(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.fir.kt index 27dac386db6..36b0d153106 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.fir.kt @@ -5,14 +5,14 @@ fun bar(x: Int): Int = x + 1 fun foo(): Int { val x: Int? = null - bar(x) + bar(x) if (x != null) return x - + val y: Int? = null if (y == null) return if (y != null) y else y - + val z: Int? = null if (z != null) return if (z == null) z else z - + return z } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt index 861d7d02672..be6571d2e0d 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt @@ -7,12 +7,12 @@ fun foo(): Int { bar(x) if (x != null) return x - + val y: Int? = null if (y == null) return if (y != null) y else y - + val z: Int? = null if (z != null) return if (z == null) z else z - + return z } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.fir.kt index 346b7ed6ed9..3f4dbf30939 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.fir.kt @@ -8,14 +8,14 @@ class Derived : Base() { fun foo() { val x: Int? = null - super.bar(x) - this.baz(x) + super.bar(x) + this.baz(x) if (x == null) return super.bar(x) this.baz(x) val y: Int? = null if (y != null) super.bar(this.baz(y)) - else this.baz(super.bar(y)) + else this.baz(super.bar(y)) } } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.fir.kt index 49c3f665296..ea864dd2faa 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.fir.kt @@ -3,7 +3,7 @@ fun bar(x: Int): RuntimeException = RuntimeException(x.toString()) fun foo() { val x: Int? = null - if (x == null) throw bar(x) + if (x == null) throw bar(x) throw bar(x) throw bar(x) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.fir.kt index a58338d2cbd..3c6cce525eb 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.fir.kt @@ -2,8 +2,8 @@ fun bar(x: Int): Int = x + 1 fun foo() { val x: Int? = null - - bar(x) + + bar(x) if (x == null) return try { bar(x) diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt index 6998e05ec1c..69fbbd6ec14 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt @@ -2,7 +2,7 @@ fun bar(x: Int): Int = x + 1 fun foo() { val x: Int? = null - + bar(x) if (x == null) return try { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.fir.kt index 91107e9017d..db001ac3d3f 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.fir.kt @@ -14,7 +14,7 @@ fun tryCatchFinally(x: Int?) { } catch (e: Exception) { x!! } finally { - checkSubtype(x) + checkSubtype(x) x!! } checkSubtype(x) diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.fir.kt index 1b923955510..47e7a20702d 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.fir.kt @@ -6,7 +6,7 @@ fun foo(x: Number, y: Int) { y -> {} else -> {} } - checkSubtype(x) + checkSubtype(x) } fun bar(x: Number) { @@ -14,7 +14,7 @@ fun bar(x: Number) { is Int -> checkSubtype(x) else -> {} } - checkSubtype(x) + checkSubtype(x) } fun whenWithoutSubject(x: Number) { @@ -22,5 +22,5 @@ fun whenWithoutSubject(x: Number) { (x is Int) -> checkSubtype(x) else -> {} } - checkSubtype(x) + checkSubtype(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.fir.kt index 1c3f30fb578..c40c0398f81 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.fir.kt @@ -3,20 +3,20 @@ fun bar(x: Int): Int = x + 1 fun foo() { val x: Int? = null while (x == null) { - bar(x) + bar(x) } bar(x) - + val y: Int? = null while (y != null) { bar(y) } - bar(y) - + bar(y) + val z: Int? = null while (z == null) { - bar(z) + bar(z) break } - bar(z) + bar(z) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt index fd01fee12cb..0662fb50085 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt @@ -6,13 +6,13 @@ fun foo() { bar(x) } bar(x) - + val y: Int? = null while (y != null) { bar(y) } bar(y) - + val z: Int? = null while (z == null) { bar(z) diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.fir.kt index 85e3b6e9cdd..7d465dd304d 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.fir.kt @@ -22,5 +22,5 @@ fun whileWithNoCondition(x: Int?) { while () { x!! } - checkSubtype(x) + checkSubtype(x) } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.fir.kt index 5760a1440ba..9d6e1135d55 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.fir.kt @@ -43,7 +43,7 @@ fun test() { val (_, `_`) = A() - foo(_, y) + foo(_, y) val (unused, _) = A() } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.fir.kt index a87fe97c06a..9ec21122498 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.fir.kt @@ -23,7 +23,7 @@ fun test(mc1: MyClass, mc2: MyClass2) { checkSubtype(c) //check no error types - checkSubtype(a) - checkSubtype(b) - checkSubtype(c) + checkSubtype(a) + checkSubtype(b) + checkSubtype(c) } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt index 7276f6c9207..87acfd28246 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt @@ -11,7 +11,7 @@ fun test() { const val a3 = 0 lateinit val a4 = 0 val a5 by Delegate() - val a6 by Delegate<T>() + val a6 by Delegate<T>() } class Delegate { diff --git a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt index 8d09b2a5612..10ffe8941be 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt @@ -11,7 +11,7 @@ fun test() { const val a3 = 0 lateinit val a4 = 0 val a5 by Delegate() - val a6 by Delegate<T>() + val a6 by Delegate<T>() } class Delegate { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt index bbe1ab30618..c27ce230540 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt @@ -4,10 +4,10 @@ package foo import kotlin.reflect.KProperty open class A { - val B.w: Int by MyProperty() + val B.w: Int by MyProperty() } -val B.r: Int by MyProperty() +val B.r: Int by MyProperty() val A.e: Int by MyProperty() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt index 90b54acd693..88cc87b76c3 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt @@ -5,7 +5,7 @@ import kotlin.reflect.KProperty class B { - val c by Delegate(ag) + val c by Delegate(ag) } class Delegate(val init: T) { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt index 516ff85718f..9a306209f14 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt @@ -5,5 +5,5 @@ object T1 { operator fun Long.getValue(receiver: String, p: Any): Double = 1.0 val String.test1 by 1 - val test2 by 1 + val test2 by 1 } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt index 840e8feb846..130f6497beb 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt @@ -10,5 +10,5 @@ object T2 { operator fun Foo.getValue(receiver: String, p: Any?): T = TODO() val String.test1: String by delegate() - val test2: String by delegate() + val test2: String by delegate() } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt index 0e530390d01..8b2936465f4 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOnFunctionalTypeWithThis.fir.kt @@ -13,7 +13,7 @@ fun wrong(arg: Wrong) {} class Wrong class Right { - val prop: () -> Unit by ::wrong + val prop: () -> Unit by ::wrong } fun box(): String { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt index e3892b9832e..75fccb01a14 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt @@ -5,7 +5,7 @@ import kotlin.reflect.KProperty val Int.a by Delegate(this) class A { - val Int.a by Delegate(this) + val Int.a by Delegate(this) } class Delegate(i: Int) { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt index a52285427e2..d8bdff29b9e 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt @@ -4,7 +4,7 @@ import kotlin.reflect.KProperty class A { - var a: Int by Delegate() + var a: Int by Delegate() } var aTopLevel: Int by Delegate() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt index 69230fdcd4a..00014ba19ea 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt @@ -4,10 +4,10 @@ import kotlin.reflect.KProperty class A { - var a: Int by Delegate() + var a: Int by Delegate() } -var aTopLevel: Int by Delegate() +var aTopLevel: Int by Delegate() class Delegate { fun getValue(t: Nothing, p: KProperty<*>): Int { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt index aa603f3f806..2025f032ec2 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt @@ -5,10 +5,10 @@ import kotlin.reflect.KProperty class A class B { - val b: Int by Delegate() + val b: Int by Delegate() } -val bTopLevel: Int by Delegate() +val bTopLevel: Int by Delegate() class C { val c: Int by Delegate() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt index 41ba3d5bafe..c901f8c7115 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt @@ -4,10 +4,10 @@ import kotlin.reflect.KProperty class B { - val b: Int by Delegate() + val b: Int by Delegate() } -val bTopLevel: Int by Delegate() +val bTopLevel: Int by Delegate() class A diff --git a/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.fir.kt b/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.fir.kt index b622087a287..cab0f189f59 100644 --- a/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.fir.kt +++ b/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.fir.kt @@ -15,14 +15,14 @@ fun test(i: Int?) { val a: Int = l4@ "" val b: Int = ("") - val c: Int = checkSubtype("") - val d: Int = checkSubtype("") + val c: Int = checkSubtype("") + val d: Int = checkSubtype("") - foo(l4@ "") - foo(("")) - foo(checkSubtype("")) - foo(checkSubtype("")) + foo(l4@ "") + foo(("")) + foo(checkSubtype("")) + foo(checkSubtype("")) use(a, b, c, d) } diff --git a/compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.fir.kt index 1d66c2651bb..dfc34368757 100644 --- a/compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.fir.kt @@ -7,24 +7,24 @@ fun test() { fooInt(1 - 1) fooInt(1 - 1.toInt()) fooInt(1 - 1.toByte()) - fooInt(1 - 1.toLong()) + fooInt(1 - 1.toLong()) fooInt(1 - 1.toShort()) - fooByte(1 - 1) - fooByte(1 - 1.toInt()) - fooByte(1 - 1.toByte()) - fooByte(1 - 1.toLong()) - fooByte(1 - 1.toShort()) + fooByte(1 - 1) + fooByte(1 - 1.toInt()) + fooByte(1 - 1.toByte()) + fooByte(1 - 1.toLong()) + fooByte(1 - 1.toShort()) - fooLong(1 - 1) - fooLong(1 - 1.toInt()) - fooLong(1 - 1.toByte()) + fooLong(1 - 1) + fooLong(1 - 1.toInt()) + fooLong(1 - 1.toByte()) fooLong(1 - 1.toLong()) - fooLong(1 - 1.toShort()) + fooLong(1 - 1.toShort()) - fooShort(1 - 1) - fooShort(1 - 1.toInt()) - fooShort(1 - 1.toByte()) - fooShort(1 - 1.toLong()) - fooShort(1 - 1.toShort()) + fooShort(1 - 1) + fooShort(1 - 1.toInt()) + fooShort(1 - 1.toByte()) + fooShort(1 - 1.toLong()) + fooShort(1 - 1.toShort()) } diff --git a/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.fir.kt index 15c7b377c16..938aadfe0cf 100644 --- a/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.fir.kt @@ -11,26 +11,26 @@ fun fooShort(p: Short) = p fun test() { fooInt(p1) - fooInt(p2) + fooInt(p2) fooInt(p3) fooInt(p4) fooInt(p5) - fooLong(p1) + fooLong(p1) fooLong(p2) - fooLong(p3) - fooLong(p4) - fooLong(p5) + fooLong(p3) + fooLong(p4) + fooLong(p5) - fooShort(p1) - fooShort(p2) - fooShort(p3) - fooShort(p4) - fooShort(p5) + fooShort(p1) + fooShort(p2) + fooShort(p3) + fooShort(p4) + fooShort(p5) - fooByte(p1) - fooByte(p2) - fooByte(p3) - fooByte(p4) - fooByte(p5) + fooByte(p1) + fooByte(p2) + fooByte(p3) + fooByte(p4) + fooByte(p5) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/evaluate/logicWithNumber.fir.kt b/compiler/testData/diagnostics/tests/evaluate/logicWithNumber.fir.kt index 42c4642839d..01f84741a3f 100644 --- a/compiler/testData/diagnostics/tests/evaluate/logicWithNumber.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/logicWithNumber.fir.kt @@ -4,5 +4,5 @@ fun bar() { // See exception in KT-13421 fun foo() { - 42 and false + 42 and false } diff --git a/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.fir.kt b/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.fir.kt index 698a000dfc9..b9785525765 100644 --- a/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.fir.kt @@ -5,22 +5,22 @@ fun fooShort(p: Short) = p fun test() { fooInt(1 + 1) - fooByte(1 + 1) - fooLong(1 + 1) - fooShort(1 + 1) + fooByte(1 + 1) + fooLong(1 + 1) + fooShort(1 + 1) fooInt(1 * 1) - fooByte(1 * 1) - fooLong(1 * 1) - fooShort(1 * 1) + fooByte(1 * 1) + fooLong(1 * 1) + fooShort(1 * 1) fooInt(1 / 1) - fooByte(1 / 1) - fooLong(1 / 1) - fooShort(1 / 1) + fooByte(1 / 1) + fooLong(1 / 1) + fooShort(1 / 1) fooInt(1 % 1) - fooByte(1 % 1) - fooLong(1 % 1) - fooShort(1 % 1) + fooByte(1 % 1) + fooLong(1 % 1) + fooShort(1 % 1) } diff --git a/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.fir.kt b/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.fir.kt index 4b970d3fd07..c1ea31e6e42 100644 --- a/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.fir.kt @@ -5,22 +5,22 @@ fun fooShort(p: Short) = p fun test() { fooInt(1.plus(1)) - fooByte(1.plus(1)) - fooLong(1.plus(1)) - fooShort(1.plus(1)) + fooByte(1.plus(1)) + fooLong(1.plus(1)) + fooShort(1.plus(1)) fooInt(1.times(1)) - fooByte(1.times(1)) - fooLong(1.times(1)) - fooShort(1.times(1)) + fooByte(1.times(1)) + fooLong(1.times(1)) + fooShort(1.times(1)) fooInt(1.div(1)) - fooByte(1.div(1)) - fooLong(1.div(1)) - fooShort(1.div(1)) + fooByte(1.div(1)) + fooLong(1.div(1)) + fooShort(1.div(1)) fooInt(1.rem(1)) - fooByte(1.rem(1)) - fooLong(1.rem(1)) - fooShort(1.rem(1)) + fooByte(1.rem(1)) + fooLong(1.rem(1)) + fooShort(1.rem(1)) } diff --git a/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.fir.kt b/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.fir.kt index ae38cf02081..b59f24a8b8a 100644 --- a/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.fir.kt @@ -5,22 +5,22 @@ fun fooShort(p: Short) = p fun test() { fooInt(1 plus 1) - fooByte(1 plus 1) - fooLong(1 plus 1) - fooShort(1 plus 1) + fooByte(1 plus 1) + fooLong(1 plus 1) + fooShort(1 plus 1) fooInt(1 times 1) - fooByte(1 times 1) - fooLong(1 times 1) - fooShort(1 times 1) + fooByte(1 times 1) + fooLong(1 times 1) + fooShort(1 times 1) fooInt(1 div 1) - fooByte(1 div 1) - fooLong(1 div 1) - fooShort(1 div 1) + fooByte(1 div 1) + fooLong(1 div 1) + fooShort(1 div 1) fooInt(1 rem 1) - fooByte(1 rem 1) - fooLong(1 rem 1) - fooShort(1 rem 1) + fooByte(1 rem 1) + fooLong(1 rem 1) + fooShort(1 rem 1) } diff --git a/compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.fir.kt index 361eff19dee..fcd6fb84995 100644 --- a/compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.fir.kt @@ -5,32 +5,32 @@ fun fooShort(p: Short) = p fun test() { fooInt(-1) - fooInt(-1111111111111111111) + fooInt(-1111111111111111111) fooInt(-1.toInt()) fooInt(-1.toByte()) - fooInt(-1.toLong()) + fooInt(-1.toLong()) fooInt(-1.toShort()) fooByte(-1) - fooByte(-1111111111111111111) - fooByte(-1.toInt()) - fooByte(-1.toByte()) + fooByte(-1111111111111111111) + fooByte(-1.toInt()) + fooByte(-1.toByte()) fooByte((-1).toByte()) - fooByte(-1.toLong()) - fooByte(-1.toShort()) + fooByte(-1.toLong()) + fooByte(-1.toShort()) fooLong(-1) fooLong(-1111111111111111111) - fooLong(-1.toInt()) - fooLong(-1.toByte()) + fooLong(-1.toInt()) + fooLong(-1.toByte()) fooLong(-1.toLong()) - fooLong(-1.toShort()) + fooLong(-1.toShort()) fooShort(-1) - fooShort(-1111111111111111111) - fooShort(-1.toInt()) - fooShort(-1.toByte()) - fooShort(-1.toLong()) - fooShort(-1.toShort()) + fooShort(-1111111111111111111) + fooShort(-1.toInt()) + fooShort(-1.toByte()) + fooShort(-1.toLong()) + fooShort(-1.toShort()) fooShort((-1).toShort()) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.fir.kt b/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.fir.kt index 6e72ce11f08..b845ebce35b 100644 --- a/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.fir.kt +++ b/compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.fir.kt @@ -12,30 +12,30 @@ fun fooShort(p: Short) = p fun test() { fooInt(p1) - fooInt(p2) - fooInt(p3) + fooInt(p2) + fooInt(p3) fooInt(p4) - fooInt(p5) - fooInt(p6) + fooInt(p5) + fooInt(p6) - fooLong(p1) + fooLong(p1) fooLong(p2) - fooLong(p3) - fooLong(p4) - fooLong(p5) + fooLong(p3) + fooLong(p4) + fooLong(p5) fooLong(p6) - fooShort(p1) - fooShort(p2) - fooShort(p3) - fooShort(p4) + fooShort(p1) + fooShort(p2) + fooShort(p3) + fooShort(p4) fooShort(p5) - fooShort(p6) + fooShort(p6) - fooByte(p1) - fooByte(p2) + fooByte(p1) + fooByte(p2) fooByte(p3) - fooByte(p4) - fooByte(p5) - fooByte(p6) + fooByte(p4) + fooByte(p5) + fooByte(p6) } diff --git a/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/approximation.fir.kt b/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/approximation.fir.kt index 36679f0c4c4..77f22f30f25 100644 --- a/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/approximation.fir.kt +++ b/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/approximation.fir.kt @@ -4,7 +4,7 @@ fun foo(x: T, y: T!!) = x!! fun main() { foo("", "").length - foo("", null).length + foo("", null).length foo(null, "").length foo(null, null).length diff --git a/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/simple.fir.kt b/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/simple.fir.kt index bfd4fbdb084..8bf5d49104b 100644 --- a/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/simple.fir.kt +++ b/compiler/testData/diagnostics/tests/explicitDefinitelyNotNull/simple.fir.kt @@ -4,7 +4,7 @@ fun foo(x: T, y: T!!): T!! = x ?: y fun main() { foo("", "").length - foo("", null).length + foo("", null).length foo(null, "").length foo(null, null).length diff --git a/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.fir.kt b/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.fir.kt index 319b8106ee9..c4eaa5dceb9 100644 --- a/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.fir.kt @@ -17,6 +17,6 @@ class C : T { super.bar() // Error super.buzz() // OK, resolved to a member super.buzz1() // Resolved to an extension - super.buzz1("") // Resolved to a member + super.buzz1("") // Resolved to a member } -} +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/funInterface/funIsNotInheritedFromBaseInterface.fir.kt b/compiler/testData/diagnostics/tests/funInterface/funIsNotInheritedFromBaseInterface.fir.kt index 6d0e0dbefa7..050c9a5a518 100644 --- a/compiler/testData/diagnostics/tests/funInterface/funIsNotInheritedFromBaseInterface.fir.kt +++ b/compiler/testData/diagnostics/tests/funInterface/funIsNotInheritedFromBaseInterface.fir.kt @@ -14,6 +14,6 @@ fun takeWithFun(a: WithFun) {} fun test() { takeBase {} - takeWithoutFun({}) + takeWithoutFun({}) takeWithFun {} } diff --git a/compiler/testData/diagnostics/tests/funInterface/resolveFunInterfaceWithoutMainMethod.fir.kt b/compiler/testData/diagnostics/tests/funInterface/resolveFunInterfaceWithoutMainMethod.fir.kt index c1f0fb14c2e..cec3a4354d4 100644 --- a/compiler/testData/diagnostics/tests/funInterface/resolveFunInterfaceWithoutMainMethod.fir.kt +++ b/compiler/testData/diagnostics/tests/funInterface/resolveFunInterfaceWithoutMainMethod.fir.kt @@ -8,5 +8,5 @@ fun referIsolatedFunFace(iff: IsolatedFunFace) {} fun callIsolatedFunFace() { referIsolatedFunFace(IsolatedFunFace {}) referIsolatedFunFace(FunAlias {}) - referIsolatedFunFace({}) + referIsolatedFunFace({}) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.fir.kt index 65b92ccea1f..842cc372edb 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.fir.kt @@ -16,6 +16,6 @@ fun test(s: Sub) { t: Trait -> s } - foo(fun(t: Sub) = s) - foo(fun(t): Super = s) + foo(fun(t: Sub) = s) + foo(fun(t): Super = s) } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.fir.kt index ac97071f7f6..f026618df0f 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.fir.kt @@ -9,21 +9,21 @@ fun test1() { foo0 { "" } - foo0 { - s: String-> "" + foo0 { + s: String-> "" } - foo0 { - x, y -> "" + foo0 { + x, y -> "" } foo1 { "" } - foo1 { - s: String -> "" + foo1 { + s: String -> "" } - foo1 { - x, y -> "" + foo1 { + x, y -> "" } foo1 { -> 42 @@ -33,11 +33,11 @@ fun test1() { foo2 { "" } - foo2 { - s: String -> "" + foo2 { + s: String -> "" } - foo2 { - x -> "" + foo2 { + x -> "" } foo2 { -> 42 diff --git a/compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.fir.kt index e7b45efa280..487b5682ca2 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.fir.kt @@ -7,4 +7,4 @@ object Z { infix fun add(b : Foo.() -> Unit) : Z = Z } -val t2 = Z add { } { } +val t2 = Z add { } { } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.fir.kt index b5a2705d497..abb1198ef3e 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.fir.kt @@ -3,5 +3,5 @@ fun foo() { val f : Function1<*, *> = { x -> x.toString() } - f(1) + f(1) } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt index 21c7540c3c1..44a1e3f13a8 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt @@ -20,8 +20,8 @@ fun main() { val a8: () -> Int = fun(): String = "1" val a9: () -> () -> () -> Int = fun(): () -> () -> String = fun(): () -> String = fun(): String = "1" - foo(fun(): String = "1") - foo(((fun(): String = "1"))) + foo(fun(): String = "1") + foo(((fun(): String = "1"))) val a10: Int.(String) -> Int = fun (x: String) = 10 val a11: () -> () -> () -> Int = fun() = fun() = fun(): String = "1" diff --git a/compiler/testData/diagnostics/tests/generics/Projections.fir.kt b/compiler/testData/diagnostics/tests/generics/Projections.fir.kt index 8ef6bf22fe4..71832d2488d 100644 --- a/compiler/testData/diagnostics/tests/generics/Projections.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/Projections.fir.kt @@ -37,16 +37,16 @@ fun testInOut() { Inv().f(1) (null as Inv).f(1) - (null as Inv).f(1) // !! - (null as Inv<*>).f(1) // !! + (null as Inv).f(1) // !! + (null as Inv<*>).f(1) // !! Inv().inf(1) (null as Inv).inf(1) - (null as Inv).inf(1) // !! - (null as Inv<*>).inf(1) // !! + (null as Inv).inf(1) // !! + (null as Inv<*>).inf(1) // !! Inv().outf() - checkSubtype((null as Inv).outf()) // Type mismatch + checkSubtype((null as Inv).outf()) // Type mismatch (null as Inv).outf() (null as Inv<*>).outf() diff --git a/compiler/testData/diagnostics/tests/generics/capturedParameters/captured.fir.kt b/compiler/testData/diagnostics/tests/generics/capturedParameters/captured.fir.kt index 354763be0a3..93d5795cd96 100644 --- a/compiler/testData/diagnostics/tests/generics/capturedParameters/captured.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/capturedParameters/captured.fir.kt @@ -10,11 +10,11 @@ class X { fun testStar(y: X.Y<*>, t: Any) { - X().foo(y, t) + X().foo(y, t) } fun testOut(y: X.Y, t: Any) { - X().foo(y, t) + X().foo(y, t) } fun testIn(y: X.Y, t: Any) { @@ -22,9 +22,9 @@ fun testIn(y: X.Y, t: Any) { } fun testWithParameter(y: X.Y, t: Any) { - X().foo(y, t) + X().foo(y, t) } fun testWithCapturedParameter(y: X.Y, t: Any) { - X().foo(y, t) + X().foo(y, t) } diff --git a/compiler/testData/diagnostics/tests/generics/genericsInType.fir.kt b/compiler/testData/diagnostics/tests/generics/genericsInType.fir.kt index 03a6774fddb..f68d382f530 100644 --- a/compiler/testData/diagnostics/tests/generics/genericsInType.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/genericsInType.fir.kt @@ -33,4 +33,4 @@ fun String.Bar>> x() {} fun Foo.Bar.ext() {} fun ex1(a: Foo.Bar): Foo.Bar { -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt index f21b8a298e3..e6715840002 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.fir.kt @@ -31,8 +31,8 @@ fun main() { checkSubtype.Inner<*>>(outer.bar()) checkSubtype.Inner<*>>(outer.Inner()) - checkSubtype.Inner>(outer.bar()) - checkSubtype.Inner>(outer.Inner()) + checkSubtype.Inner>(outer.bar()) + checkSubtype.Inner>(outer.Inner()) outer.set(outer.bar()) outer.set(outer.Inner()) diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt index 50641cc1111..6b049f5c704 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/simple.fir.kt @@ -25,8 +25,8 @@ fun main() { checkSubtype.Inner>(outer.bar()) checkSubtype.Inner>(outer.Inner()) - checkSubtype.Inner>(outer.bar()) - checkSubtype.Inner>(outer.Inner()) + checkSubtype.Inner>(outer.bar()) + checkSubtype.Inner>(outer.Inner()) outer.set(outer.bar()) outer.set(outer.Inner()) diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.fir.kt index 3f09cfe537b..92df856d594 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.fir.kt @@ -32,7 +32,7 @@ fun main() { outer.set(outer.Inner()) val x: Outer.Inner = factoryString() - outer.set(x) + outer.set(x) val y: Outer.Inner = infer("") outer.set(y) diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt index c16e0722bb5..f8586a9c92b 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.fir.kt @@ -29,9 +29,9 @@ fun main() { checkSubtype.Inner>(outer.bar()) checkSubtype.Inner>(outer.Inner()) - outer.set(outer.bar()) - outer.set(outer.Inner()) + outer.set(outer.bar()) + outer.set(outer.Inner()) val x: Outer.Inner = factoryString() - outer.set(x) + outer.set(x) } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt index 235de26c5bc..9cf418ef0be 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.fir.kt @@ -18,8 +18,8 @@ class Outer { bar(outerE(), baz()) bar(instance().outerE(), baz()) - bar(topLevel().Inner().baz(), topLevel().Inner().baz()) - bar(topLevel().Inner().foo(), topLevel().Inner().baz()) + bar(topLevel().Inner().baz(), topLevel().Inner().baz()) + bar(topLevel().Inner().foo(), topLevel().Inner().baz()) setE(foo()) } @@ -45,5 +45,5 @@ fun foo() { strInt.instance().Inner().checkType { _.Inner>() } Outer().setInner(strInt) - Outer().setInner(strInt) + Outer().setInner(strInt) } diff --git a/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.fir.kt index 03e3a5d44db..b5582d032e6 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.fir.kt @@ -7,11 +7,11 @@ fun foo1(x: E) {} fun E.foo2() {} fun bar(x: F) { - A(x) - A(x) + A(x) + A(x) - foo1(x) - foo1(x) + foo1(x) + foo1(x) x.foo2() x.foo2() diff --git a/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt index f5a37d10a32..08d44428c98 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.fir.kt @@ -4,7 +4,7 @@ fun Unit)?> foo(x: E, y: T) { } if (y != null) { - y(x) + y(x) } if (x != null && y != null) { diff --git a/compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.fir.kt index 98f6fa489f0..ad512613934 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.fir.kt @@ -6,7 +6,7 @@ fun foo(): T { val x1: T = null val x2: T? = null - bar(null) + bar(null) bar(null) return null @@ -23,7 +23,7 @@ class A { val x1: F = null val x2: F? = null - xyz(null) + xyz(null) bar(null) return null diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.fir.kt index 75812a0174a..7af4c403d9b 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.fir.kt @@ -17,7 +17,7 @@ fun foo(x: T) { bar1(x) bar1(x) bar2(x) - bar3(x) + bar3(x) } if (x is String) { @@ -35,7 +35,7 @@ fun foo(x: T) { bar1(x) bar2(x) - bar3(x) + bar3(x) } if (1 == 1) { @@ -43,10 +43,10 @@ fun foo(x: T) { bar1(x) bar1(x) bar2(x) - bar3(x) + bar3(x) bar1(y) bar2(y) - bar3(y) + bar3(y) } } diff --git a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.fir.kt index 2d2cdac7f92..bbb5fd5457d 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.fir.kt @@ -17,15 +17,15 @@ class A { val x2 = foo2(x) x2.checkType { _() } - foo1(y) - foo1(y) + foo1(y) + foo1(y) foo2(y) val x3 = foo2(y) x3.checkType { _() } - foo1(y) - foo2(y) + foo1(y) + foo2(y) foo1(z) @@ -37,13 +37,13 @@ class A { val x5 = foo2(z) x4.checkType { _() } - foo1(w) - foo1(w) + foo1(w) + foo1(w) foo2(w) val x6 = foo2(w) x6.checkType { _() } - foo1(w) + foo1(w) } } diff --git a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.fir.kt index 24fb210b617..f21a8a01c4b 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.fir.kt @@ -18,9 +18,9 @@ class A { fun bar() { // F fooInv1>(Inv()) - fooInv2>(Inv()) + fooInv2>(Inv()) fooInv1(Inv()) - fooInv2(Inv()) + fooInv2(Inv()) fooIn1>(In()) fooIn2>(In()) @@ -33,15 +33,15 @@ class A { fooOut2(Out()) // Z - fooInv1>(Inv()) - fooInv2>(Inv()) - fooInv1(Inv()) - fooInv2(Inv()) + fooInv1>(Inv()) + fooInv2>(Inv()) + fooInv1(Inv()) + fooInv2(Inv()) - fooIn1>(In()) - fooIn2>(In()) - fooIn1(In()) - fooIn2(In()) + fooIn1>(In()) + fooIn2>(In()) + fooIn1(In()) + fooIn2(In()) fooOut1>(Out()) fooOut2>(Out()) @@ -49,19 +49,19 @@ class A { fooOut2(Out()) // W - fooInv1>(Inv()) - fooInv2>(Inv()) - fooInv1(Inv()) - fooInv2(Inv()) + fooInv1>(Inv()) + fooInv2>(Inv()) + fooInv1(Inv()) + fooInv2(Inv()) - fooIn1>(In()) - fooIn2>(In()) - fooIn1(In()) - fooIn2(In()) + fooIn1>(In()) + fooIn2>(In()) + fooIn1(In()) + fooIn2(In()) - fooOut1>(Out()) + fooOut1>(Out()) fooOut2>(Out()) - fooOut1(Out()) + fooOut1(Out()) fooOut2(Out()) } } diff --git a/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.fir.kt b/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.fir.kt index 311cb420ec3..825afde72d5 100644 --- a/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.fir.kt @@ -13,6 +13,6 @@ fun foo(x: T) { bar1(x) bar2(x) - bar3(x) - bar4(x) + bar3(x) + bar4(x) } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.fir.kt index 0283c5eb433..f838a567a99 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.fir.kt @@ -15,18 +15,18 @@ fun mc(): MC = null!! fun c(): C = null!! fun foo(x: MC) { - x.addAll(x) - x.addAllMC(x) + x.addAll(x) + x.addAllMC(x) - x.addAll(mc()) - x.addAllMC(mc()) + x.addAll(mc()) + x.addAllMC(mc()) - x.addAll(mc()) - x.addAllMC(mc()) + x.addAll(mc()) + x.addAllMC(mc()) x.addAll(c()) x.addAll(c()) - x.addAllInv(mc()) - x.addAll(1) + x.addAllInv(mc()) + x.addAll(1) } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.fir.kt index 11fa0b761b8..11c53b219ee 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.fir.kt @@ -5,5 +5,5 @@ interface B { } fun foo(x: B, y: A) { - x.foo(y) + x.foo(y) } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.fir.kt index 7660b1dedb8..bfe78a04eb2 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.fir.kt @@ -14,6 +14,6 @@ fun test(a: A, y: Out) { val i = a.foo() // TODO: These diagnostic are wrong, type of 'i' --- 'In' is not projected itself, // but it's approximation result caused by 'a' projection - i.invoke1("") - i.invoke2(y) + i.invoke1("") + i.invoke2(y) } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.fir.kt index dc8ef0fce76..f75905a9af0 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.fir.kt @@ -6,5 +6,5 @@ class A { } fun test(a: A) { - a.foo("", "") + a.foo("", "") } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.fir.kt index 3dd7ce34287..0a3c82c5e05 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.fir.kt @@ -8,7 +8,7 @@ class A { } fun test(a: A) { - a + "" - a[1] = "" - a[""] + a + "" + a[1] = "" + a[""] } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.fir.kt index 7b905950ad9..7f79fcf4a6f 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.fir.kt @@ -6,18 +6,18 @@ class C { } fun foo(x: Any?, y: C<*>) { - y.bindTo("") + y.bindTo("") if (x is C<*>) { - x.bindTo("") + x.bindTo("") with(x) { - bindTo("") + bindTo("") } } with(x) { if (this is C<*>) { - bindTo("") + bindTo("") } } } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.fir.kt index c2abfc7d52e..442969a9fcf 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.fir.kt @@ -4,7 +4,7 @@ interface A interface B : A> fun foo(x : B<*>) { - bar1(x) // this should not be valid + bar1(x) // this should not be valid bar2(x) bar3(x) } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.fir.kt index 48265c7ce2f..01340ed7b96 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.fir.kt @@ -12,5 +12,5 @@ fun acceptA(a: A) { fun main(i: I<*>) { i.foo() checkType { _() } - acceptA(i.foo()) // i.foo() should be nullable but isn't + acceptA(i.foo()) // i.foo() should be nullable but isn't } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.fir.kt index bf1c53064b6..7a128a0ceea 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.fir.kt @@ -10,9 +10,9 @@ class A { class Out fun test(a: A, y: Out) { - a + y - a[1] = y - a[y] + a + y + a[1] = y + a[y] a + Out() a[1] = Out() diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.fir.kt index b7ec4f2145a..b0ab7830151 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.fir.kt @@ -13,15 +13,15 @@ class A { } fun foo2(a: A, b: A) { - a.foo1(Out()) - a.foo1>(Out()) + a.foo1(Out()) + a.foo1>(Out()) a.foo1(Out()) a.foo1(Out()) a.foo2(Inv()) - a.foo2(Inv()) - a.foo2>(Inv()) + a.foo2(Inv()) + a.foo2>(Inv()) a.foo3(In()) a.foo3(In()) @@ -32,12 +32,12 @@ fun foo2(a: A, b: A) { b.foo1>(Out()) b.foo2(Inv()) - b.foo2(Inv()) - b.foo2>(Inv()) + b.foo2(Inv()) + b.foo2>(Inv()) - b.foo3(In()) - b.foo3>(In()) + b.foo3(In()) + b.foo3>(In()) b.foo3(In()) b.foo3(In()) diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt index 59951f0d8df..c21154f95f3 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.fir.kt @@ -6,8 +6,8 @@ class A { } fun test(a: A, y: Array) { - a.foo("", "", "") - a.foo(*y) + a.foo("", "", "") + a.foo(*y) // TODO: TYPE_MISMATCH_DUE_TO_TYPE_PROJECTIONS probably redundant - a.foo(*y, "") + a.foo(*y, "") } diff --git a/compiler/testData/diagnostics/tests/generics/starProjections/invalid.fir.kt b/compiler/testData/diagnostics/tests/generics/starProjections/invalid.fir.kt index 23be8a295d5..7fa36d8ecf7 100644 --- a/compiler/testData/diagnostics/tests/generics/starProjections/invalid.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/starProjections/invalid.fir.kt @@ -17,7 +17,7 @@ fun main(a: A<*>, j: JavaClass<*>, i2: Inv2<*>) { j.foo() checkType { _() } i2.x checkType { _() } - j.bar(1, 2, Any()) + j.bar(1, 2, Any()) j.bar(null) } diff --git a/compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.fir.kt b/compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.fir.kt index ddb591346bb..e3b863f05ee 100644 --- a/compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.fir.kt @@ -10,8 +10,8 @@ class A { fun foo(x: A, cs: CharSequence, ls: List) { val y: A = x - y.foo(cs) - val s: String = y.foo(cs, ls) + y.foo(cs) + val s: String = y.foo(cs, ls) val ls2: List = y.bar() } diff --git a/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt b/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt index f0568b2dff3..65e91ba8ee7 100644 --- a/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.fir.kt @@ -9,6 +9,6 @@ public class JavaClass { // FILE: main.kt fun foo() { JavaClass().foo(Any()) - JavaClass().bar(Any()) + JavaClass().bar(Any()) JavaClass().bar("") } diff --git a/compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.fir.kt b/compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.fir.kt index 6c01868ec0f..1bc5870127d 100644 --- a/compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.fir.kt @@ -132,7 +132,7 @@ fun testMembersFromSupertypes() { fromI() genericFromI(3) - genericFromI("a") + genericFromI("a") own -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/imports/ImportFromObject.fir.kt b/compiler/testData/diagnostics/tests/imports/ImportFromObject.fir.kt index 8da9103fbc1..14ca7028292 100644 --- a/compiler/testData/diagnostics/tests/imports/ImportFromObject.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/ImportFromObject.fir.kt @@ -126,7 +126,7 @@ fun testMembersFromSupertypes() { fromI() genericFromI(3) - genericFromI("a") + genericFromI("a") own } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.fir.kt b/compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.fir.kt index 3902c5b8ef1..3afe8b10396 100644 --- a/compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.fir.kt +++ b/compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.fir.kt @@ -37,7 +37,7 @@ fun test() { two() two(1) - two("") + two("") all() all(1) diff --git a/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.fir.kt b/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.fir.kt index da8923cfadc..392bb16b338 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.fir.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.fir.kt @@ -7,7 +7,7 @@ interface A fun infer(a: A) : T {} fun test(nothing: Nothing?) { - val i = infer(nothing) + val i = infer(nothing) } fun sum(a : IntArray) : Int { diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt index 2aa0ed9abff..8b52ab11722 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt @@ -15,6 +15,6 @@ interface TestInterface { fun test() { val ret = combined({ }) { - emit(1) + emit(1) } } diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt index 7b36c7a0a02..2a95bc7574d 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/approximateContravariantCapturedTypes.fir.kt @@ -36,7 +36,7 @@ fun test2() { val fooSetRef = , CapturedType(*), CapturedType(*)>")!>Foo<*>::setX1 val foo = Foo(1f) - fooSetRef.invoke(foo, 1) + fooSetRef.invoke(foo, 1) foo.x.bar() } @@ -54,7 +54,7 @@ fun test4() { val fooSetRef = , CapturedType(*), CapturedType(*)>")!>Foo2<*>::setX1 val foo = Foo2(1) - fooSetRef.invoke(foo, "") + fooSetRef.invoke(foo, "") foo.x.bar() } diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.fir.kt index f340ddb3f7e..02a88a1740b 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.fir.kt @@ -5,13 +5,13 @@ fun bar(a: Array): Array = null!! fun test1(a: Array) { - val r: Array = bar(a) - bar(a) + val r: Array = bar(a) + bar(a) } fun foo(l: Array): Array> = null!! fun test2(a: Array) { - val r: Array> = foo(a) - foo(a) + val r: Array> = foo(a) + foo(a) } diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.fir.kt index ef490e8875a..a9c9bf21908 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.fir.kt @@ -1,11 +1,11 @@ interface Inv fun > foo(x: X, y: Y) { - val rX = bar(x) - rX.length + val rX = bar(x) + rX.length - val rY = bar(y) - rY.length + val rY = bar(y) + rY.length } fun bar(l: Inv): Y = TODO() diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.fir.kt index 1d437d55c57..af760e4fdc5 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.fir.kt @@ -4,7 +4,7 @@ fun foo(array: Array>): Array> = array fun test(array: Array>) { - foo(array) + foo(array) - val f: Array> = foo(array) + val f: Array> = foo(array) } diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.fir.kt index 29dc2d569ec..ab9488a78f9 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.fir.kt @@ -11,8 +11,8 @@ fun bar(b: B>, bOut: B>, bOut2: B(b) - baz(bOut) - baz(bOut) + baz(bOut) + baz(bOut) baz(bOut2) baz(bOut2) diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.fir.kt index 31edfecd0f8..c6c4582bd8f 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypesInSelfType.fir.kt @@ -4,5 +4,5 @@ class Foo>(val values: Array) fun foo(x: Array>) { - val y = Foo(x) + val y = Foo(x) } diff --git a/compiler/testData/diagnostics/tests/inference/commonSuperTypeOfErrorTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/commonSuperTypeOfErrorTypes.fir.kt index c1c3e279798..0a0f2941a85 100644 --- a/compiler/testData/diagnostics/tests/inference/commonSuperTypeOfErrorTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/commonSuperTypeOfErrorTypes.fir.kt @@ -13,9 +13,9 @@ fun test() { materializeErrorType>>>() ) - consume( + consume( materializeErrorType>>>(), - materializeErrorType>>() + materializeErrorType>>() ) } diff --git a/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.fir.kt b/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.fir.kt index e2f422cf43c..c31d96cdb22 100644 --- a/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.fir.kt @@ -15,5 +15,5 @@ fun joinT(x: Comparable<*>, y: T): T? { fun test() { val x2 = joinT(Unit, "2") - checkSubtype(x2) + checkSubtype(x2) } diff --git a/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt b/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt index 8a9c36b2f74..c8e5dfb8245 100644 --- a/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/completion/withExact.fir.kt @@ -16,11 +16,11 @@ fun id(arg: K): K = arg fun test1(arg: Derived) { id>(Inv(arg)) - id>(InvExact(arg)) + id>(InvExact(arg)) } fun Inv<@Exact R>.select(first: R, second: R): R = TODO() fun test2(derived: Derived, other: Other) { - Inv(derived).select(derived, other) + Inv(derived).select(derived, other) } diff --git a/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt index f8f2a5ee9e9..8bf396cd3e6 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt @@ -12,5 +12,5 @@ fun choose3(c: Inv>) {} fun f(o: Out>, i: In>, inv: Inv>) { choose1(o) choose2(i) - choose3(inv) + choose3(inv) } diff --git a/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.fir.kt index 04d68257dba..122525114b8 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.fir.kt @@ -3,7 +3,7 @@ package c import java.util.ArrayList -fun Array.toIntArray(): IntArray = this.mapTo(IntArray(size), {it}) +fun Array.toIntArray(): IntArray = this.mapTo(IntArray(size), {it}) fun Array.toArrayList(): ArrayList = this.mapTo(ArrayList(size), {it}) diff --git a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt index 76a93b26011..f1dc8c0c3bd 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt @@ -140,8 +140,8 @@ class Main(x: L?, y: L) { val x120 = foo12(x!!) val x121 = foo12(y!!) - val x122 = foo12(x) - val x123 = foo12(y) + val x122 = foo12(x) + val x123 = foo12(y) val x133 = Foo13(x).foo1(y) val x135 = Foo13(y).foo1(y) diff --git a/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt index 3895321adef..38ef8e2f11d 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt @@ -21,6 +21,6 @@ public class Foo { fun test(e: ErrorType) { Foo.foo { - Sam.Result.create(e) + Sam.Result.create(e) } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.fir.kt index 2d90e788e21..907ab33178d 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.fir.kt @@ -18,8 +18,8 @@ fun test(out: Out, i: In, inv: A) { r checkType { _() } // T? <: Int => error - doIn(i) + doIn(i) // T? >: Int => error - doA(inv) + doA(inv) } diff --git a/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt b/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt index 754a8b78dc7..63bea3fbf23 100644 --- a/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt @@ -43,9 +43,9 @@ fun test1(int: Int, any: Any) { readFromMyList(getMyList(int), any) readFromMyList(getMyList(any), int) - readFromMyList(getMyList(any), int) + readFromMyList(getMyList(any), int) - readFromMyList(getMyListToReadFrom(any), int) + readFromMyList(getMyListToReadFrom(any), int) readFromMyList(getMyListToReadFrom(any), int) readFromMyList(getMyListToReadFrom(int), any) @@ -61,7 +61,7 @@ fun test1(int: Int, any: Any) { readFromMyList(getMyListToWriteTo(any), any) - writeToMyList(getMyListToReadFrom(any), any) + writeToMyList(getMyListToReadFrom(any), any) use(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) } diff --git a/compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.fir.kt index 61e2939c97d..1186903faf0 100644 --- a/compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.fir.kt @@ -4,5 +4,5 @@ fun foo(t: T, t1: T) {} fun test() { //no type inference error - foo(aaab, bbb) + foo(aaab, bbb) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/kt1293.fir.kt b/compiler/testData/diagnostics/tests/inference/kt1293.fir.kt index a16738e4f05..ea29e46f681 100644 --- a/compiler/testData/diagnostics/tests/inference/kt1293.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/kt1293.fir.kt @@ -6,7 +6,7 @@ package kt1293 fun main() { val intArray = arrayOfNulls(10) val i : Int = intArray[0] - requiresInt(intArray[0]) + requiresInt(intArray[0]) } fun requiresInt(i: Int) {} diff --git a/compiler/testData/diagnostics/tests/inference/mapFunction.fir.kt b/compiler/testData/diagnostics/tests/inference/mapFunction.fir.kt index 54cf1e0dc54..df6c165eea9 100644 --- a/compiler/testData/diagnostics/tests/inference/mapFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/mapFunction.fir.kt @@ -20,8 +20,8 @@ fun foo() { checkSubtype>(b) //check for non-error types - checkSubtype(u) - checkSubtype(b) + checkSubtype(u) + checkSubtype(b) } diff --git a/compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.fir.kt b/compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.fir.kt index a64c7fa2700..04730ed66f5 100644 --- a/compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.fir.kt @@ -12,7 +12,7 @@ fun java.lang.Iterable.map1(f : (T) -> R) : List {} fun test(list: List) { val res = list.map1 { it } //check res is not of error type - checkSubtype(res) + checkSubtype(res) } fun Collection.foo() {} @@ -21,5 +21,5 @@ fun java.lang.Iterable.foo() {} fun test1(list: List) { val res = list.foo() //check res is not of error type - checkSubtype(res) + checkSubtype(res) } diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.fir.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.fir.kt index ef4e3dfba39..58a821ac5c4 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.fir.kt @@ -1,7 +1,7 @@ package a fun test(c: C) { - foo(c.b) + foo(c.b) } fun foo(s: String) = s diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.fir.kt index a3edf6a5978..ba71a918aa9 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.fir.kt @@ -10,6 +10,6 @@ fun foo(s: String) {} fun r(): Int? = null fun test() { - foo(F().p()) - foo(r()) + foo(F().p()) + foo(r()) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/publicApproximation/intersectionLocations.fir.kt b/compiler/testData/diagnostics/tests/inference/publicApproximation/intersectionLocations.fir.kt index 743999aa99e..1ab84ed60cf 100644 --- a/compiler/testData/diagnostics/tests/inference/publicApproximation/intersectionLocations.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/publicApproximation/intersectionLocations.fir.kt @@ -38,7 +38,7 @@ fun testStarProjection() = BiParam( intersect(First, Second), makeStarProjection() ) -fun testErrorType() = BiParam( +fun testErrorType() = BiParam( intersect(First, Second), - unresolved + unresolved ) diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt index 3313fa3c6fe..fecf410cbb3 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.fir.kt @@ -3,7 +3,7 @@ fun foo() { fun bar1() = bar1() fun bar2() = 1 + bar2() - fun bar3() = id(bar3()) + fun bar3() = id(bar3()) } fun id(x: T) = x diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt1145.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt1145.fir.kt index 12d9a7c5a9f..fde772c35a1 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt1145.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt1145.fir.kt @@ -8,7 +8,7 @@ import checkSubtype fun test(numbers: Iterable) { val s = numbers.map{it.toString()}.fold(""){it, it2 -> it + it2} - checkSubtype(s) + checkSubtype(s) } //from library diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt1718.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt1718.fir.kt index b7727bba810..e88657b9d2e 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt1718.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt1718.fir.kt @@ -10,7 +10,7 @@ fun test() { val list = arrayList("foo", "bar") + arrayList("cheese", "wine") checkSubtype>(list) //check it's not an error type - checkSubtype(list) + checkSubtype(list) } //from library diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2407.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2407.fir.kt index b9c208001d8..6d14b228639 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2407.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2407.fir.kt @@ -8,7 +8,7 @@ import checkSubtype fun test() { val foo = arrayList("").map { it -> it.length }.fold(0, { x, y -> Math.max(x, y) }) checkSubtype(foo) - checkSubtype(foo) + checkSubtype(foo) } //from library diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2838.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2838.fir.kt index eb292dfecd2..251bcd5cc03 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2838.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2838.fir.kt @@ -8,7 +8,7 @@ fun bar(a: T, b: Map) = b.get(a) fun test(a: Int) { foo(a, null) - bar(a, null) + bar(a, null) } fun test1(a: Int) { foo(a, throw Exception()) diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt index e91f493dd55..a86f711f102 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt @@ -5,21 +5,21 @@ import java.lang.Exception fun id(arg: K): K = arg fun test() { - id(unresolved)!! + id(unresolved)!! unresolved!!!! try { - id(unresolved) + id(unresolved) } catch (e: Exception) { - id(unresolved) + id(unresolved) } if (true) - id(unresolved) + id(unresolved) else - id(unresolved) + id(unresolved) when { - true -> id(unresolved) + true -> id(unresolved) } - id(unresolved) ?: id(unresolved) + id(unresolved) ?: id(unresolved) } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt index 5e8254c4013..9624c28f2a1 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt @@ -4,8 +4,8 @@ fun id(arg: K): K = arg fun materialize(): M = TODO() fun test(b: Boolean) { - id(if (b) { - id(unresolved) + id(if (b) { + id(unresolved) } else { id( materialize() diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt41386.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt41386.fir.kt index 81e07c9dfc7..cb7137d18d0 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt41386.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt41386.fir.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +NewInference open class Test(val map1 : Map, val map2 : Map) { - open val inverse: Test = object : Test(map2, map1) { + open val inverse: Test = object : Test(map2, map1) { override val inverse: Test get() = this@Test } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt index 297a148019c..fd7ffbafc96 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt @@ -4,6 +4,6 @@ fun foo(block: (T)-> R, second: (T)-> S) = block fun main() { val fff = { x: Int -> aaa } - foo(fff, { x -> x + 1 }) + foo(fff, { x -> x + 1 }) } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.fir.kt index 06cc3058d82..23aba2b62af 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.fir.kt @@ -7,9 +7,9 @@ fun foo(a: A) = a fun bar(f: (T) -> R) = f fun test() { - foo { it } - foo { x -> x} - foo { x: Int -> x} + foo { it } + foo { x -> x} + foo { x: Int -> x} bar { it + 1 } bar { x -> x + 1} diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt index 7874eeadf0e..c7be5251afd 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt @@ -5,9 +5,9 @@ fun id2(x: K, s: String): K = x fun ret(s: String): K = TODO() fun test() { - id2(unresolved, "foo") - id2(unresolved, 42) + id2(unresolved, "foo") + id2(unresolved, 42) ret("foo") - ret(42) + ret(42) } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.fir.kt index 5b3f5b533e1..8ad50aae265 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.fir.kt @@ -4,5 +4,5 @@ class A fun A.fn(b: Int): Nothing = TODO() fun A.run() { - "".apply { fn("") } + "".apply { fn("") } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.fir.kt index 71c1e1b753b..216e5d1a791 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.fir.kt @@ -2,20 +2,20 @@ // WITH_RUNTIME fun Runnable.test(f: Runnable.(Int) -> Unit) { - f("") + f("") } fun test(f: Runnable.(Int) -> Unit, runnable: Runnable) { with (runnable) { - f("") + f("") } } fun Int.test(f: String.(Int) -> Unit) { f("", 0) - f("") + f("") with("") { f(0) - f(0.0) + f(0.0) } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.fir.kt b/compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.fir.kt index 5f9f2718b55..409cca765bd 100644 --- a/compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.fir.kt @@ -6,5 +6,5 @@ class A { fun test1() { A().newA().useT("") - A().newA().useT(1) + A().newA().useT(1) } diff --git a/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt b/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt index 89310e995d3..603610016fa 100644 --- a/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.fir.kt @@ -20,6 +20,6 @@ class Foo { fun test() { Foo().bar().baz().getR(1) - Foo().bar().baz().getR("") + Foo().bar().baz().getR("") } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.fir.kt b/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.fir.kt index 394619704fa..4c8a9884c86 100644 --- a/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.fir.kt @@ -10,7 +10,7 @@ class Outer { fun test1() { Outer().Inner().getOuter().useOuterParam(22) - Outer().Inner().getOuter().useOuterParam("") + Outer().Inner().getOuter().useOuterParam("") } diff --git a/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.fir.kt b/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.fir.kt index d6f97330e59..f56ada63152 100644 --- a/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.fir.kt @@ -5,9 +5,9 @@ package typeConstructorMismatch import java.util.* fun test(set: Set) { - elemAndList("2", set) + elemAndList("2", set) - "".elemAndListWithReceiver("", set) + "".elemAndListWithReceiver("", set) } fun elemAndList(r: R, t: List): R = r diff --git a/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.fir.kt b/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.fir.kt index 65adab20a79..f98ecebf7f6 100644 --- a/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.fir.kt @@ -33,9 +33,9 @@ fun test1(outA: Out, inB: In) { fun bar(o: Out, i: In): Two = throw Exception("$o $i") fun test2(outA: Out, inC: In) { - bar(outA, inC) + bar(outA, inC) - val b: Two = bar(outA, inC) + val b: Two = bar(outA, inC) use(b) } diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.fir.kt index 38ae04e2545..3672992af62 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.fir.kt @@ -221,18 +221,18 @@ fun case_13() { val x3 = null as MutableList val x4 = select(null as List, null) - val result_1 = select(x1, x2, x3, x4) - val result_2 = select(x2, x1) - val result_3 = select(x2, x1, x3) - val result_4 = select(x3, x2) - val result_5 = select(x4, x2) - val result_6 = select(x4, x3, x2) - val result_7 = select(A(x1), A(x2), A(x3), A(x4)) - val result_8 = select(A(x2), A(x1)) - val result_9 = select(A(x2), A(x1), A(x3)) - val result_10 = select(A(x3), A(x2)) - val result_11 = select(A(x4), A(x2)) - val result_12 = select(A(x4), A(x3), A(x2)) + val result_1 = select(x1, x2, x3, x4) + val result_2 = select(x2, x1) + val result_3 = select(x2, x1, x3) + val result_4 = select(x3, x2) + val result_5 = select(x4, x2) + val result_6 = select(x4, x3, x2) + val result_7 = select(A(x1), A(x2), A(x3), A(x4)) + val result_8 = select(A(x2), A(x1)) + val result_9 = select(A(x2), A(x1), A(x3)) + val result_10 = select(A(x3), A(x2)) + val result_11 = select(A(x4), A(x2)) + val result_12 = select(A(x4), A(x3), A(x2)) result_1 result_2 diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.ni.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.ni.fir.kt index bbfcd1839ba..314b48179dd 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.ni.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/flexibilityInCommonSuperTypeCalculation.ni.fir.kt @@ -221,18 +221,18 @@ fun case_13() { val x3 = null as MutableList val x4 = select(null as List, null) - val result_1 = select(x1, x2, x3, x4) - val result_2 = select(x2, x1) - val result_3 = select(x2, x1, x3) - val result_4 = select(x3, x2) - val result_5 = select(x4, x2) - val result_6 = select(x4, x3, x2) - val result_7 = select(A(x1), A(x2), A(x3), A(x4)) - val result_8 = select(A(x2), A(x1)) - val result_9 = select(A(x2), A(x1), A(x3)) - val result_10 = select(A(x3), A(x2)) - val result_11 = select(A(x4), A(x2)) - val result_12 = select(A(x4), A(x3), A(x2)) + val result_1 = select(x1, x2, x3, x4) + val result_2 = select(x2, x1) + val result_3 = select(x2, x1, x3) + val result_4 = select(x3, x2) + val result_5 = select(x4, x2) + val result_6 = select(x4, x3, x2) + val result_7 = select(A(x1), A(x2), A(x3), A(x4)) + val result_8 = select(A(x2), A(x1)) + val result_9 = select(A(x2), A(x1), A(x3)) + val result_10 = select(A(x3), A(x2)) + val result_11 = select(A(x4), A(x2)) + val result_12 = select(A(x4), A(x3), A(x2)) result_1 result_2 diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.fir.kt index 5980f137ce2..675483b1ffe 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.fir.kt @@ -16,7 +16,7 @@ fun checkItIsExactlyAny(t: T, l: MutableList) {} fun baz(v: V, u: MutableSet) = u fun test(a: Any, s: MutableSet) { - baz(a, s) + baz(a, s) } //from standard library diff --git a/compiler/testData/diagnostics/tests/inference/violatingUpperBoundForSelfType.fir.kt b/compiler/testData/diagnostics/tests/inference/violatingUpperBoundForSelfType.fir.kt index 3b5cad23443..760bbb2af4e 100644 --- a/compiler/testData/diagnostics/tests/inference/violatingUpperBoundForSelfType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/violatingUpperBoundForSelfType.fir.kt @@ -5,5 +5,5 @@ fun > createMap(enumClass: Class) {} fun reproduce() { val enumClass: Class> = "any" as Class> - createMap(enumClass) + createMap(enumClass) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt b/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt index 2c7a28cbc00..1e0631d1dc3 100644 --- a/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt +++ b/compiler/testData/diagnostics/tests/infos/SmartCasts.fir.kt @@ -189,11 +189,11 @@ fun returnFunctionLiteralExpressionBody(a: Any?): Function0 = fun mergeSmartCasts(a: Any?) { if (a is String || a is Int) { - a.compareTo("") + a.compareTo("") a.toString() } if (a is Int || a is String) { - a.compareTo("") + a.compareTo("") } when (a) { is String, is Any -> a.compareTo("") diff --git a/compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.fir.kt b/compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.fir.kt index 05527d81a2a..f6aaf5693f1 100644 --- a/compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.fir.kt @@ -21,7 +21,7 @@ class Outer { fun foo() { Outer.Inner() - Outer.Inner(1) + Outer.Inner(1) Outer.Inner("") } diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.fir.kt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.fir.kt index 9492d128b0a..244b83e407f 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.fir.kt @@ -19,5 +19,5 @@ public class Y extends X { fun main() { checkSubtype(Y().fooN()) - Y().barN(null); + Y().barN(null); } diff --git a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.fir.kt b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.fir.kt index 49780d0e7e3..549c3e7e7eb 100644 --- a/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.fir.kt @@ -19,5 +19,5 @@ public class Y extends X { fun main() { checkSubtype(Y().fooN()) - Y().barN(null); + Y().barN(null); } diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.fir.kt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.fir.kt index 592b6c233ff..bf9fb91134f 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.fir.kt @@ -2,7 +2,7 @@ import java.util.* fun foo() { val al = ArrayList() al.size - al.contains(1) + al.contains(1) al.contains("") al.remove("") @@ -10,7 +10,7 @@ fun foo() { val hs = HashSet() hs.size - hs.contains(1) + hs.contains(1) hs.contains("") hs.remove("") @@ -18,10 +18,10 @@ fun foo() { val hm = HashMap() hm.size - hm.containsKey(1) + hm.containsKey(1) hm.containsKey("") - hm[1] + hm[1] hm[""] hm.remove("") diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.fir.kt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.fir.kt index 574fa9177aa..933e72eac6a 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.fir.kt @@ -35,32 +35,32 @@ fun foo( al: java.util.ArrayList ) { a.contains("") - a.contains(1) + a.contains(1) "" in a - 1 in a + 1 in a b.contains("") - b.contains(1) + b.contains(1) "" in b - 1 in b + 1 in b ic.contains("") - ic.contains(1) + ic.contains(1) "" in ic - 1 in ic + 1 in ic ka.contains("") - ka.contains(1) + ka.contains(1) "" in ka - 1 in ka + 1 in ka kb.contains("") - kb.contains(1) + kb.contains(1) "" in kb - 1 in kb + 1 in kb al.contains("") - al.contains(1) + al.contains(1) "" in al - 1 in al + 1 in al } diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.fir.kt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.fir.kt index 6d8492519a4..62b148dfde6 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.fir.kt @@ -37,20 +37,20 @@ fun foo( cs: Collection, ca: Collection ) { a.containsAll(cs) - a.containsAll(ca) + a.containsAll(ca) b.containsAll(cs) - b.containsAll(ca) + b.containsAll(ca) ic.containsAll(cs) - ic.containsAll(ca) + ic.containsAll(ca) ka.containsAll(cs) - ka.containsAll(ca) + ka.containsAll(ca) kb.containsAll(cs) - kb.containsAll(ca) + kb.containsAll(ca) al.containsAll(cs) - al.containsAll(ca) + al.containsAll(ca) } diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.fir.kt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.fir.kt index 922dee9c897..f13b2046c8d 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.fir.kt @@ -18,7 +18,7 @@ fun foo(a: A, ka: KA) { 1 in a ka.contains("") - ka.contains(1) + ka.contains(1) "" in ka - 1 in ka + 1 in ka } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.fir.kt index 1042d4ef213..07814a5a1a4 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.fir.kt @@ -12,6 +12,6 @@ fun test(x: List, y: List) { A("", x) checkType { _>() } A("", y) checkType { _>() } - A("", x) + A("", x) A("", y) } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt index c867e5747d2..1012262d2c3 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.fir.kt @@ -14,5 +14,5 @@ fun test(x: List, y: List) { Outer().Inner("", y, 1) checkType { _.Inner>() } Outer().Inner("", x, 1) checkType { _.Inner>() } - Outer().Inner("", x, 1) + Outer().Inner("", x, 1) } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.fir.kt index fd33141f842..ac9ddeaabb3 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.fir.kt @@ -10,7 +10,7 @@ fun test(x: List, y: List) { A("", x) // inferred as Any! A("", y) - A("", x) + A("", x) A("", x) A("", y) diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.fir.kt index b2c873d053b..0045756feac 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.fir.kt @@ -10,12 +10,12 @@ public class A { class Inv fun test(x: Inv, y: Inv) { - A("", x) + A("", x) A("", y) - A("", x) + A("", x) - A("", x) + A("", x) A("", y) - A("", y) + A("", y) } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.fir.kt index 9cd1000405e..06556bae449 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.fir.kt @@ -10,9 +10,9 @@ public class A { // FILE: main.kt class B1(x: List) : A("", x) -class B2(x: List) : A("", x) +class B2(x: List) : A("", x) class C : A { constructor(x: List) : super("", x) - constructor(x: List, y: Int) : super("", x) + constructor(x: List, y: Int) : super("", x) } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.fir.kt index a5fb8aabaed..39e676b31ea 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.fir.kt @@ -13,9 +13,9 @@ public class A { // if there is not enough information to infer corresponding arguments // May be we could add some special syntax for such arguments class B1(x: List) : A("", x) -class B2(x: List) : A("", x) +class B2(x: List) : A("", x) class C : A { constructor(x: List) : super("", x) - constructor(x: List, y: Int) : super("", x) + constructor(x: List, y: Int) : super("", x) } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.fir.kt index 4ff0ddd0b6e..0bf9e025b11 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.fir.kt @@ -11,7 +11,7 @@ fun test(x: List, y: List) { var z: A = A("", x) // E inferred from expected type z = A("", y) - z = A("", x) + z = A("", x) z = A("", x) z = A("", y) diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.fir.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.fir.kt index dc79ff1dce8..fad33b8fb85 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.fir.kt @@ -11,8 +11,8 @@ public class J { import java.io.Serializable -fun cloneable(c: Cloneable) = J(c) +fun cloneable(c: Cloneable) = J(c) -fun serializable(s: Serializable) = J(s) +fun serializable(s: Serializable) = J(s) fun both(t: T) where T : Cloneable, T : Serializable = J(t) diff --git a/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.fir.kt b/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.fir.kt index f2960f1f362..e6b82938b98 100644 --- a/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.fir.kt @@ -100,7 +100,7 @@ public class SpecializedMap extends AbstractSpecializedMap { // FILE: main.kt fun foo(x: SpecializedMap) { x.containsKey(1) - x.containsKey(null) + x.containsKey(null) x.get(2) x.get(null) diff --git a/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.fir.kt b/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.fir.kt index 0b5a2d8db28..15462da0915 100644 --- a/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.fir.kt @@ -16,12 +16,12 @@ public interface J2 extends J { // FILE: main.kt fun main() { - J { s: String -> s} // should be prohibited, because SAM value parameter has nullable type + J { s: String -> s} // should be prohibited, because SAM value parameter has nullable type J { "" + it.length } J { null } J { it?.length?.toString() } - J2 { s: String -> s} + J2 { s: String -> s} J2 { "" + it.length } J2 { null } J2 { it?.length?.toString() } diff --git a/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.fir.kt b/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.fir.kt index 1c2ee9979c3..0c79d1e27c3 100644 --- a/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.fir.kt @@ -48,6 +48,6 @@ fun main() { x -> x.toString() } - A.baz(block) + A.baz(block) A.baz(block2) } diff --git a/compiler/testData/diagnostics/tests/j+k/serializable.fir.kt b/compiler/testData/diagnostics/tests/j+k/serializable.fir.kt index 33d4685ad52..94a19b1b6b5 100644 --- a/compiler/testData/diagnostics/tests/j+k/serializable.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/serializable.fir.kt @@ -33,8 +33,8 @@ fun testLiterals() { } fun testNotSerializable(l: List) { - use(l) - use(N()) + use(l) + use(N()) } enum class C { diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt index 06f07e576f9..680e2244b3c 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullable.fir.kt @@ -18,7 +18,7 @@ public interface SLRUMap { // FILE: main.kt fun SLRUMap.getOrPut(value: V, l: List) { - takeV(value) + takeV(value) takeVList(l) takeE(value) diff --git a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt index f85cd4aa40b..5d5d3c7b95c 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/notNullTypeParameterWithKotlinNullableWarnings.fir.kt @@ -18,7 +18,7 @@ public interface SLRUMap { // FILE: main.kt fun SLRUMap.getOrPut(value: V, l: List) { - takeV(value) + takeV(value) takeVList(l) takeE(value) diff --git a/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.fir.kt b/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.fir.kt index 0c3a1fd26da..0995db885ab 100644 --- a/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.fir.kt @@ -20,5 +20,5 @@ class In { fun test() { A.foo().x() checkType { _() } - A.bar().y(null) + A.bar().y(null) } diff --git a/compiler/testData/diagnostics/tests/library/Collections.fir.kt b/compiler/testData/diagnostics/tests/library/Collections.fir.kt index 688e3b4aa77..85fa039e77b 100644 --- a/compiler/testData/diagnostics/tests/library/Collections.fir.kt +++ b/compiler/testData/diagnostics/tests/library/Collections.fir.kt @@ -4,7 +4,7 @@ package collections fun testCollection(c: Collection, t: T) { c.size c.isEmpty() - c.contains(1) + c.contains(1) val iterator: Iterator = c.iterator() c.containsAll(c) @@ -20,7 +20,7 @@ fun testCollection(c: Collection, t: T) { fun testMutableCollection(c: MutableCollection, t: T) { c.size c.isEmpty() - c.contains(1) + c.contains(1) val iterator: Iterator = c.iterator() c.containsAll(c) @@ -62,7 +62,7 @@ fun testMutableList(l: MutableList, t: T) { fun testSet(s: Set, t: T) { s.size s.isEmpty() - s.contains(1) + s.contains(1) val iterator: Iterator = s.iterator() s.containsAll(s) @@ -78,7 +78,7 @@ fun testSet(s: Set, t: T) { fun testMutableSet(s: MutableSet, t: T) { s.size s.isEmpty() - s.contains(1) + s.contains(1) val iterator: Iterator = s.iterator() s.containsAll(s) diff --git a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.fir.kt b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.fir.kt index 69a7f9ebd6e..dd32cd0f96d 100644 --- a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.fir.kt +++ b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.fir.kt @@ -21,10 +21,10 @@ fun a() { val b = Example() consumeString(a + b) - consumeInt(a - b) + consumeInt(a - b) consumeString(a plus b) - consumeInt(a minus b) + consumeInt(a minus b) a * b a / b diff --git a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.fir.kt b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.fir.kt index 514ef6a0ccc..03a213f7177 100644 --- a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.fir.kt +++ b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.fir.kt @@ -30,12 +30,12 @@ fun a() { with (Example()) { consumeInt(this + a) - consumeString(this - b) + consumeString(this - b) consumeInt(this * a) consumeInt(this / b) consumeInt(this plus a) - consumeString(this minus b) + consumeString(this minus b) consumeInt(this times a) consumeInt(this div b) } diff --git a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.fir.kt b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.fir.kt index 2ecb1895096..b52086ac493 100644 --- a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.fir.kt +++ b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.fir.kt @@ -28,16 +28,16 @@ fun test() { var a = Example() val b = Example() - consumeString(a()) - consumeString(a[1]) + consumeString(a()) + consumeString(a[1]) val (x, y) = Example() - consumeString(x) - consumeString(y) + consumeString(x) + consumeString(y) - consumeExample2(++a) + consumeExample2(++a) - consumeString(a plus b) + consumeString(a plus b) } fun consumeInt(i: Int) {} diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.fir.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.fir.kt index 97610c28a91..f5970be8728 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.fir.kt @@ -25,5 +25,5 @@ public fun foo(a: A) { import p.* fun test() { - foo(M1().a) + foo(M1().a) } diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.fir.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.fir.kt index 6fc7ff0296c..1f1d4f33b08 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.fir.kt @@ -64,5 +64,5 @@ fun test(m1: M1) { d(m1.d) e(m1.e) f(m1.f) - g(m1.g) + g(m1.g) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.fir.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.fir.kt index 9de45048e8f..435f8d8a150 100644 --- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.fir.kt +++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.fir.kt @@ -36,7 +36,7 @@ public fun d(d: D) { import p.* fun test() { - a(M1().b) // Type arguments do not match - c(M1().b) // Type arguments do not match + a(M1().b) // Type arguments do not match + c(M1().b) // Type arguments do not match d(M1().b) // Type arguments do match } diff --git a/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.fir.kt b/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.fir.kt index 0204e21d7ed..8b524aee227 100644 --- a/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.fir.kt +++ b/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.fir.kt @@ -7,7 +7,7 @@ fun bar(x : Int = 1, y : Int = 1, z : String) { fun test() { foo() foo(2) - foo("") + foo("") foo(b = "") foo(1, "") foo(a = 2) diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt index c30dd5c1fd0..82aa7aee305 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.fir.kt @@ -35,5 +35,5 @@ fun main() { } val f : String = a!! - checkSubtype(a!!) + checkSubtype(a!!) } diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.fir.kt index 1d567c4e277..0c7e1257a61 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.fir.kt @@ -6,25 +6,25 @@ class Foo { fun main() { val x: Foo? = null val y: Foo? = null - + x.foo(y) - x!!.foo(y) + x!!.foo(y) x.foo(y!!) x!!.foo(y!!) - + val a: Foo? = null val b: Foo? = null val c: Foo? = null - + a.foo(b.foo(c)) a!!.foo(b.foo(c)) - a.foo(b!!.foo(c)) - a!!.foo(b!!.foo(c)) + a.foo(b!!.foo(c)) + a!!.foo(b!!.foo(c)) a.foo(b.foo(c!!)) a!!.foo(b.foo(c!!)) a.foo(b!!.foo(c!!)) a!!.foo(b!!.foo(c!!)) - + val z: Foo? = null z!!.foo(z!!) } diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt index e28faf8df67..baff72dd922 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt @@ -6,16 +6,16 @@ class Foo { fun main() { val x: Foo? = null val y: Foo? = null - + x.foo(y) x!!.foo(y) x.foo(y!!) x!!.foo(y!!) - + val a: Foo? = null val b: Foo? = null val c: Foo? = null - + a.foo(b.foo(c)) a!!.foo(b.foo(c)) a.foo(b!!.foo(c)) @@ -24,7 +24,7 @@ fun main() { a!!.foo(b.foo(c!!)) a.foo(b!!.foo(c!!)) a!!.foo(b!!.foo(c!!)) - + val z: Foo? = null z!!.foo(z!!) } diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.fir.kt index 0cc13b612c3..4ee20cf434b 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.fir.kt @@ -7,7 +7,7 @@ fun foo(x: Int): Int = x + 1 fun main() { val x: Int? = null - foo(x) + foo(x) if (x != null) { foo(x) @@ -15,14 +15,14 @@ fun main() { foo(x) } - foo(x) + foo(x) if (x != null) { foo(x) foo(x!!) foo(x) } else { - foo(x) + foo(x) foo(x!!) foo(x) } @@ -30,7 +30,7 @@ fun main() { foo(x) foo(x!!) foo(x) - + val y: Int? = null y!! y!! diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt index 50032992b3a..0e4193fc611 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt @@ -30,7 +30,7 @@ fun main() { foo(x) foo(x!!) foo(x) - + val y: Int? = null y!! y!! diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.fir.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.fir.kt index d1621f806a5..a5f67469b54 100644 --- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.fir.kt +++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.fir.kt @@ -15,8 +15,8 @@ fun foo() { val y: Int? = 0 val z: Int? = 0 - bar(if (y != null) y else z, y) + bar(if (y != null) y else z, y) y + 2 - baz(y, y, if (y == null) return else y, y) + baz(y, y, if (y == null) return else y, y) baz(y, z!!, z, y) } diff --git a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.fir.kt b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.fir.kt index 6adf2af7c53..fd58d87825e 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.fir.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.fir.kt @@ -1,3 +1,3 @@ fun test(x: Int?) { - x in 1..2 + x in 1..2 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.fir.kt b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.fir.kt index 93e05a43a71..13ee4dbdf08 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.fir.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.fir.kt @@ -13,6 +13,6 @@ public class J { fun test(j: J, nullStr: String?, nullByte: Byte?, nullDouble: Double?) { j.foo(nullStr) - j.foo(nullDouble) + j.foo(nullDouble) j.foo(nullByte) } diff --git a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.fir.kt b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.fir.kt index abbe5c5e7c1..ac2ee3313fc 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.fir.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.fir.kt @@ -6,8 +6,8 @@ fun foo(x: Int) {} fun foo(x: Int, y: String) {} fun bar(nullX: Int?, nullY: String?, notNullY: String) { - foo(nullX) - foo(nullX, notNullY) - foo(nullX, nullY) + foo(nullX) + foo(nullX, notNullY) + foo(nullX, nullY) foo() } diff --git a/compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.fir.kt b/compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.fir.kt index b3eadb00e43..4394ffb1230 100644 --- a/compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.fir.kt @@ -8,5 +8,5 @@ fun foo(i: Int) = i fun test(a: A?) { a?.b(1) //should be no warning - foo(a?.b(1)) //no warning, only error + foo(a?.b(1)) //no warning, only error } diff --git a/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.fir.kt b/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.fir.kt index 6e89529d5b1..754458888ea 100644 --- a/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.fir.kt +++ b/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.fir.kt @@ -2,11 +2,11 @@ fun foo(n: Number) = n fun test() { - foo('a') - + foo('a') + val c = 'c' - foo(c) + foo(c) val d: Char? = 'd' - foo(d!!) + foo(d!!) } diff --git a/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt b/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt index 0b478abd11b..a8b30693cef 100644 --- a/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt +++ b/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt @@ -3,7 +3,7 @@ fun foo(n: Number) = n fun test() { foo('a') - + val c = 'c' foo(c) diff --git a/compiler/testData/diagnostics/tests/numbers/literalReceiverWithIntegerValueType.fir.kt b/compiler/testData/diagnostics/tests/numbers/literalReceiverWithIntegerValueType.fir.kt index c215250faf9..9f5a178350a 100644 --- a/compiler/testData/diagnostics/tests/numbers/literalReceiverWithIntegerValueType.fir.kt +++ b/compiler/testData/diagnostics/tests/numbers/literalReceiverWithIntegerValueType.fir.kt @@ -6,62 +6,62 @@ abstract class C { } fun testLongDotCall(c1: C) { - c1.takeT(1.plus(2)) - c1.takeT(1.minus(2)) - c1.takeT(1.times(2)) - c1.takeT(1.div(2)) - c1.takeT(1.rem(2)) - c1.takeT(1.inc()) - c1.takeT(1.dec()) - c1.takeT(1.unaryPlus()) - c1.takeT(1.unaryMinus()) - c1.takeT(1.shl(2)) - c1.takeT(1.shr(2)) - c1.takeT(1.ushr(2)) - c1.takeT(1.and(2)) - c1.takeT(1.or(2)) - c1.takeT(1.xor(2)) - c1.takeT(1.inv()) + c1.takeT(1.plus(2)) + c1.takeT(1.minus(2)) + c1.takeT(1.times(2)) + c1.takeT(1.div(2)) + c1.takeT(1.rem(2)) + c1.takeT(1.inc()) + c1.takeT(1.dec()) + c1.takeT(1.unaryPlus()) + c1.takeT(1.unaryMinus()) + c1.takeT(1.shl(2)) + c1.takeT(1.shr(2)) + c1.takeT(1.ushr(2)) + c1.takeT(1.and(2)) + c1.takeT(1.or(2)) + c1.takeT(1.xor(2)) + c1.takeT(1.inv()) } fun testShortDotCall(c2: C) { - c2.takeT(1.plus(2)) - c2.takeT(1.inc()) - c2.takeT(1.dec()) - c2.takeT(1.shr(2)) - c2.takeT(1.inv()) + c2.takeT(1.plus(2)) + c2.takeT(1.inc()) + c2.takeT(1.dec()) + c2.takeT(1.shr(2)) + c2.takeT(1.inv()) } fun testByteDotCall(c3: C) { - c3.takeT(1.plus(2)) - c3.takeT(1.inc()) - c3.takeT(1.dec()) - c3.takeT(1.shr(2)) - c3.takeT(1.inv()) + c3.takeT(1.plus(2)) + c3.takeT(1.inc()) + c3.takeT(1.dec()) + c3.takeT(1.shr(2)) + c3.takeT(1.inv()) } fun testLongOperatorInfixCall(c4: C) { - c4.takeT(1 + 2) - c4.takeT(1 - 2) - c4.takeT(1 * 2) - c4.takeT(1 / 2) - c4.takeT(1 % 2) + c4.takeT(1 + 2) + c4.takeT(1 - 2) + c4.takeT(1 * 2) + c4.takeT(1 / 2) + c4.takeT(1 % 2) c4.takeT(+1) c4.takeT(-1) - c4.takeT(1 shl 2) - c4.takeT(1 shr 2) - c4.takeT(1 ushr 2) - c4.takeT(1 and 2) - c4.takeT(1 or 2) - c4.takeT(1 xor 2) + c4.takeT(1 shl 2) + c4.takeT(1 shr 2) + c4.takeT(1 ushr 2) + c4.takeT(1 and 2) + c4.takeT(1 or 2) + c4.takeT(1 xor 2) } fun testShortOperatorInfixCall(c5: C) { - c5.takeT(1 + 2) - c5.takeT(1 shr 2) + c5.takeT(1 + 2) + c5.takeT(1 shr 2) } fun testByteOperatorInfixCall(c6: C) { - c6.takeT(1 + 2) - c6.takeT(1 shr 2) + c6.takeT(1 + 2) + c6.takeT(1 shr 2) } diff --git a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.fir.kt b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.fir.kt index c6f1f114cc0..295e47da674 100644 --- a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.fir.kt +++ b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.fir.kt @@ -31,9 +31,9 @@ fun test() { val g: Byte = either(1, 300) - other(11) + other(11) - otherGeneric(1) + otherGeneric(1) val r = either(1, "") r checkType { _() } @@ -48,7 +48,7 @@ interface Inv fun exactBound(t: T, l: Inv): T = throw Exception("$t $l") fun testExactBound(invS: Inv, invI: Inv, invB: Inv) { - exactBound(1, invS) + exactBound(1, invS) exactBound(1, invI) val b = exactBound(1, invB) @@ -72,7 +72,7 @@ interface Contr fun upperBound(t: T, l: Contr): T = throw Exception("$t $l") fun testUpperBound(contrS: Contr, contrB: Contr, contrN: Contr) { - upperBound(1, contrS) + upperBound(1, contrS) val n = upperBound(1, contrN) n checkType { _() } diff --git a/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.fir.kt b/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.fir.kt index 6720e33f495..ea5206f40a9 100644 --- a/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.fir.kt +++ b/compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.fir.kt @@ -1,6 +1,6 @@ //no nested class access via instance reference error fun test() { - A.Companion.f("") + A.Companion.f("") } class A() { diff --git a/compiler/testData/diagnostics/tests/objects/kt5527.fir.kt b/compiler/testData/diagnostics/tests/objects/kt5527.fir.kt index 24c1fc278ae..27ae3be0f08 100644 --- a/compiler/testData/diagnostics/tests/objects/kt5527.fir.kt +++ b/compiler/testData/diagnostics/tests/objects/kt5527.fir.kt @@ -9,12 +9,12 @@ class A { fun foo() { val i1: Int = Boo val i2: Int = A.Boo - useInt(Boo) - useInt(A.Boo) + useInt(Boo) + useInt(A.Boo) } fun bar() { val i1: Int = Unit - useInt(Unit) + useInt(Unit) } fun useInt(i: Int) = i diff --git a/compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.fir.kt index c0f7356621d..60f181adef4 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.fir.kt @@ -7,9 +7,9 @@ fun fooShort(p: Short) = p fun test() { fooInt(1 % 1) - fooByte(1 % 1) - fooLong(1 % 1) - fooShort(1 % 1) + fooByte(1 % 1) + fooLong(1 % 1) + fooShort(1 % 1) } public operator fun Int.rem(other: Int): Int = 0 diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.fir.kt index 60c26d0d1d6..23e503d87a8 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.fir.kt @@ -9,7 +9,7 @@ object A { } fun test() { - takeString(A % 123) + takeString(A % 123) } fun takeString(s: String) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt b/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt index 1d608206b05..f0ff5155834 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.fir.kt @@ -22,10 +22,10 @@ object OnlyRem { } fun test() { - takeInt(ModAndRem % 1) + takeInt(ModAndRem % 1) val c = ModAssignAndRemAssign - c %= "" + c %= "" var c1 = RemAndModAssign c1 %= 1 @@ -36,4 +36,4 @@ fun test() { c2 %= 1 } -fun takeInt(x: Int) {} +fun takeInt(x: Int) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt index 5b151c50d65..66880ac154d 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt @@ -18,8 +18,8 @@ object MismatchingTypes { } fun testMismatchingTypes() { - ++MismatchingTypes[0] - MismatchingTypes[0]++ + ++MismatchingTypes[0] + MismatchingTypes[0]++ MismatchingTypes[0] += 1 } @@ -42,3 +42,4 @@ fun testMismatchingArities() { MismatchingArities2[0]++ MismatchingArities2[0] += 1 } + diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/int.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/int.fir.kt index 01b8afecf1b..9c94624f2d9 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/int.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/int.fir.kt @@ -12,5 +12,5 @@ import p.* fun test() { J()._int(1) - J()._int(null) + J()._int(null) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.fir.kt index a0599c7d3c1..837df1f1c86 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.fir.kt @@ -17,10 +17,10 @@ public class A { // FILE: k.kt fun test() { - A.create().bar(null) + A.create().bar(null) A.create().bar("") - A().bar(null) - A().bar(null) + A().bar(null) + A().bar(null) A().bar("") } diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.fir.kt index 011ed315190..9589725a8a9 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.fir.kt @@ -33,9 +33,9 @@ class C2 : A() { } fun test() { - B1().bar(null) - B2().bar(null) + B1().bar(null) + B2().bar(null) - C1().bar(null) + C1().bar(null) } diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.fir.kt index c9275ffedc1..2a39733a4c9 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.fir.kt @@ -15,7 +15,7 @@ public class J { fun test() { val n = J.staticN - foo(n) + foo(n) J.staticNN = n if (n != null) { foo(n) diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.fir.kt index e276ae877b4..4b92ca4060d 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.fir.kt @@ -23,7 +23,7 @@ fun test() { val platformJ = J.staticJ checkSubtype(platformNN) - checkSubtype(platformN) + checkSubtype(platformN) checkSubtype(platformJ) checkSubtype(platformNN) diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.fir.kt index c3324690eea..da118c85f9d 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.fir.kt @@ -15,7 +15,7 @@ public class J { fun test() { foo(J.staticNN) - foo(J.staticN) + foo(J.staticN) foo(J.staticJ) bar(J.staticNN) diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.fir.kt index 86f49b1f8d2..a7da5a027ea 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.fir.kt @@ -54,8 +54,8 @@ fun test(n: J?, nn: J) { J.staticSet(nn, nn, nn) J.staticSet(platformNN, platformNN, platformNN) - J.staticSet(n, n, n) - J.staticSet(platformN, platformN, platformN) + J.staticSet(n, n, n) + J.staticSet(platformN, platformN, platformN) J.staticSet(platformJ, platformJ, platformJ) J().nn = n @@ -78,13 +78,13 @@ fun test(n: J?, nn: J) { J().set(nn, nn, nn) J().set(platformNN, platformNN, platformNN) - J().set(n, n, n) - J().set(platformN, platformN, platformN) + J().set(n, n, n) + J().set(platformN, platformN, platformN) J().set(platformJ, platformJ, platformJ) J(nn, nn, nn) J(platformNN, platformNN, platformNN) - J(n, n, n) - J(platformN, platformN, platformN) + J(n, n, n) + J(platformN, platformN, platformN) J(platformJ, platformJ, platformJ) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.fir.kt index 5f920cab0f7..f8a226c0cd5 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.fir.kt @@ -27,8 +27,8 @@ val strList: List = null!! fun main() { val rawA = Test.rawAField - var rawInner = rawA.Inner("", "", strList) - rawInner.foo("", "", strList) - rawInner.bar().foo("") + var rawInner = rawA.Inner("", "", strList) + rawInner.foo("", "", strList) + rawInner.bar().foo("") } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.fir.kt index ef3a7846b4c..9deda8f1a72 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.fir.kt @@ -30,5 +30,5 @@ val strList: List = null!! fun main() { val rawB = Test.rawAField.b; // Raw(A).b is not erased because it have no type parameters - var rawInner = rawB.bar(strList) + var rawInner = rawB.bar(strList) } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.fir.kt index 9cb68995aa6..7d17053aec8 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.fir.kt @@ -32,5 +32,5 @@ fun main() { val rawA = rawADerived.bar() rawA.x = strList - rawA.foo("", strList) + rawA.foo("", strList) } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt index a66207ef414..6348481ec04 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt @@ -36,6 +36,6 @@ fun foo(x: B<*>) { // FIR doesn't work here, because // field has a type of just 'A' and it's not clear why should it accept 'String' at consume // NB: some kind of BareTypeScope should be in use here - Test.rawB.field.consume("") + Test.rawB.field.consume("") val y: Any = Test.rawB.field.produce() } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.fir.kt index c095717a028..4e3dc5c1856 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.fir.kt @@ -29,11 +29,11 @@ fun main() { val rawA = Test.rawAField rawA.x = strList rawA.y = strMap - rawA.foo("", strList, strList) + rawA.foo("", strList, strList) val barResult = rawA.bar() barResult.x = strList barResult.y = strMap - barResult.foo("", strList, null) + barResult.foo("", strList, null) } diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.fir.kt index f4ebcf67d44..01a463b476a 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.fir.kt @@ -21,7 +21,7 @@ class Test { val doubleList: List = null!! fun main() { - Test.rawField.foo("", doubleList) - Test.rawField.foo(null, doubleList) - Test.DerivedRawA().foo(null, doubleList) + Test.rawField.foo("", doubleList) + Test.rawField.foo(null, doubleList) + Test.DerivedRawA().foo(null, doubleList) } diff --git a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.fir.kt index 6050510761f..c6a07306533 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.fir.kt @@ -10,7 +10,7 @@ class E : B1() { x.foo(x) x.foo("") - x.bar(x) + x.bar(x) x.bar("") } diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.fir.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.fir.kt index eb78d1bccf5..e56fd8d69f4 100644 --- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.fir.kt +++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.fir.kt @@ -7,7 +7,7 @@ object Outer { get() = 0 override fun get(index: Int): Char { - checkSubtype(x) + checkSubtype(x) return ' ' } diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.fir.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.fir.kt index 97deba12572..dadfa97842d 100644 --- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.fir.kt +++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.fir.kt @@ -10,8 +10,8 @@ class A { val a get() = b val b get() = a - val z1 get() = id(z1) - val z2 get() = l(z2) + val z1 get() = id(z1) + val z2 get() = l(z2) val u get() = field } diff --git a/compiler/testData/diagnostics/tests/regressions/CoercionToUnit.fir.kt b/compiler/testData/diagnostics/tests/regressions/CoercionToUnit.fir.kt index 575b3387c25..22878c00167 100644 --- a/compiler/testData/diagnostics/tests/regressions/CoercionToUnit.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/CoercionToUnit.fir.kt @@ -1,9 +1,9 @@ fun foo(u : Unit) : Int = 1 fun test() : Int { - foo(1) + foo(1) val a : () -> Unit = { - foo(1) + foo(1) } return 1 } diff --git a/compiler/testData/diagnostics/tests/regressions/DoubleDefine.fir.kt b/compiler/testData/diagnostics/tests/regressions/DoubleDefine.fir.kt index 6ec5de4f0a3..c2fd41b21ea 100644 --- a/compiler/testData/diagnostics/tests/regressions/DoubleDefine.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/DoubleDefine.fir.kt @@ -10,7 +10,7 @@ fun takeFirst(expr: StringBuilder): Char { fun evaluateArg(expr: CharSequence, numbers: ArrayList): Int { if (expr.length == 0) throw Exception("Syntax error: Character expected"); - val c = takeFirst(expr) + val c = takeFirst(expr) if (c >= '0' && c <= '9') { val n = c - '0' if (!numbers.contains(n)) throw Exception("You used incorrect number: " + n) diff --git a/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt b/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt index 66b4444b6da..84aaf3d524e 100644 --- a/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt @@ -2,7 +2,7 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER fun test(a: Int, b: Boolean) { - bar(a.foo(b)) + bar(a.foo(b)) } fun T.foo(l: (T) -> R): R = TODO() diff --git a/compiler/testData/diagnostics/tests/regressions/kt1489_1728.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt1489_1728.fir.kt index cf2fd9afae7..450b0be92c7 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt1489_1728.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt1489_1728.fir.kt @@ -19,7 +19,7 @@ class C { fun p() : Resource? = null fun bar() { - foo(p()) { + foo(p()) { } } diff --git a/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt index 8ab57f61314..d621faff8f1 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt30245.fir.kt @@ -44,9 +44,9 @@ fun test1() { // to extension lambda 0 val f10 = W1(fun Int.(): Int = this) // oi+ ni+ val g10: E0 = id(fun Int.(): Int = this) // oi+ ni+ - val w11 = W1 { i: Int -> i } // oi- ni- + val w11 = W1 { i: Int -> i } // oi- ni- val i11: E0 = id { i: Int -> i } // o1+ ni+ - val w12 = W1 { i -> i } // oi- ni- + val w12 = W1 { i -> i } // oi- ni- val i12: E0 = id { i -> i } // oi- ni- val j12 = id { i -> i } // oi- ni- @@ -78,14 +78,14 @@ fun test2() { // to extension lambda 1 val i26: E1 = id { s: String -> this + s.length } // oi- ni+ val i26a: E1 = id { s -> this + s.length } // oi+ ni+ val e = E.VALUE - val w27 = W2(when (e) { E.VALUE -> { s: String -> this + s.length } }) // oi- ni+ - val w27a = W2(when (e) { E.VALUE -> { s -> this + s.length } }) // oi+ ni+ + val w27 = W2(when (e) { E.VALUE -> { s: String -> this + s.length } }) // oi- ni+ + val w27a = W2(when (e) { E.VALUE -> { s -> this + s.length } }) // oi+ ni+ val i27: E1 = when (e) { E.VALUE -> { s: String -> this + s.length } } // oi+ ni+ val i27a: E1 = when (e) { E.VALUE -> { s -> this + s.length } } // oi+ ni+ - val w28 = W2 { i: Int, s -> i + s.length } // oi- ni- + val w28 = W2 { i: Int, s -> i + s.length } // oi- ni- val i28: E1 = id { i: Int, s -> i + s.length } // oi- ni- - val w29 = W2 { i: Int, s: String -> i + s.length } // oi- ni- + val w29 = W2 { i: Int, s: String -> i + s.length } // oi- ni- val i29: E1 = id { i: Int, s: String -> i + s.length } // oi+ ni+ // yet unsupported cases with ambiguity for the lambda conversion (commented constructors in wrappers above) @@ -111,7 +111,7 @@ fun test3() { // to non-extension lambda 1 // val i32: L1 = id { this } // this or it: oi- ni- // val j32 = id { this } // this or it: oi- ni- - val w33 = W3(fun Int.(): Int = this) // oi- ni+ + val w33 = W3(fun Int.(): Int = this) // oi- ni+ val i33: L1 = id(fun Int.(): Int = this) // oi+ ni+ // yet unsupported cases with ambiguity for the lambda conversion (commented constructors in wrappers above) diff --git a/compiler/testData/diagnostics/tests/regressions/kt32205.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt32205.fir.kt index b8b6498cc7a..c2061cf81ce 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt32205.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt32205.fir.kt @@ -8,5 +8,5 @@ public class A { fun test(vararg values: A) { A.foo(*values) - A.foo(values) + A.foo(values) } diff --git a/compiler/testData/diagnostics/tests/regressions/kt334.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt334.fir.kt index 3daf03e8233..06825f13115 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt334.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt334.fir.kt @@ -3,6 +3,6 @@ import java.lang.Comparable as Comparable fun f(c: Comparable<*>) { - checkSubtype>(c) + checkSubtype>(c) checkSubtype>(c) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt index 273270909f5..c1fc5dadfbc 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt @@ -25,7 +25,7 @@ public class Manager { class Task(val callback: Manager.() -> Unit) : Runnable { override public fun run() { - callback() // Manager is not accessible here, but no error is shown + callback() // Manager is not accessible here, but no error is shown } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/regressions/kt7585/base.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt7585/base.fir.kt index f0170d5a349..787912a190b 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt7585/base.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt7585/base.fir.kt @@ -7,7 +7,7 @@ abstract class Wrapper(protected val t: T) class MyWrapper(a: A): Wrapper(a) // This wrapper is not legal -class TheirWrapper(e: E): Wrapper(e) +class TheirWrapper(e: E): Wrapper(e) data class Pair(val a: T, val b: T) diff --git a/compiler/testData/diagnostics/tests/regressions/kt7585/java.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt7585/java.fir.kt index c73bcd67b3e..ae842e22e14 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt7585/java.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt7585/java.fir.kt @@ -17,7 +17,7 @@ class E class MyWrapper(a: A): Wrapper(a) // This wrapper is not legal -class TheirWrapper(e: E): Wrapper(e) +class TheirWrapper(e: E): Wrapper(e) data class Pair(val a: T, val b: T) diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.fir.kt index 40954777dd8..1d4a539deb1 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.fir.kt @@ -8,7 +8,7 @@ operator fun T.invoke(a: A) {} fun foo(s: String, ai: A) { 1(ai) - s(ai) + s(ai) - ""(ai) + ""(ai) } diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.fir.kt index e565821cbee..7e64054a47e 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.fir.kt @@ -6,7 +6,7 @@ fun test1() { } fun test2(f: String.(Int) -> Unit) { - 11.(f)(1) + 11.(f)(1) 11.(f)() } diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt index 42798dd77f2..ac3698b8b5b 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.fir.kt @@ -10,5 +10,5 @@ fun test(identifier: SomeClass, fn: String.() -> Unit) { identifier() identifier(123) identifier(1, 2) - 1.fn() + 1.fn() } diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt index 4541883398a..71ca8ad03e3 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.fir.kt @@ -17,7 +17,7 @@ fun test(a: A, b: B) { b.(foo)() - (b.foo)() + (b.foo)() foo(b) (foo)(b) diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt index 2632e43b888..e6edf1f1c3e 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.fir.kt @@ -9,5 +9,5 @@ fun test(identifier: SomeClass, fn: String.() -> Unit) { identifier() identifier(123) identifier(1, 2) - 1.fn() + 1.fn() } diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.fir.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.fir.kt index 0acde4900a5..6bc9de2c7d0 100644 --- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.fir.kt @@ -5,5 +5,5 @@ fun foo(i: Int) {} fun test(s: String?) { - foo(s?.length) + foo(s?.length) } diff --git a/compiler/testData/diagnostics/tests/resolve/newLineLambda.fir.kt b/compiler/testData/diagnostics/tests/resolve/newLineLambda.fir.kt index 27d0a82836a..364d1d77525 100644 --- a/compiler/testData/diagnostics/tests/resolve/newLineLambda.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/newLineLambda.fir.kt @@ -83,9 +83,9 @@ fun testVararg() { varargFn(1,2,3) // comment // comment {} - varargFn(1,2,3) {} {} - varargFn(1,2,3) {} - {} + varargFn(1,2,3) {} {} + varargFn(1,2,3) {} + {} } fun testTwoLambdas() { diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.fir.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.fir.kt index e675a31a9f8..4929b83062d 100644 --- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.fir.kt @@ -2,13 +2,13 @@ // !DIAGNOSTICS: -USELESS_ELVIS fun test() { - bar(if (true) { + bar(if (true) { 1 } else { 2 - }) + }) - bar(1 ?: 2) + bar(1 ?: 2) } fun bar(s: String) = s diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.fir.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.fir.kt index 730066d811c..f5e5e217963 100644 --- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.fir.kt @@ -33,5 +33,5 @@ fun testDataFlowInfo2(a: Int?, b: Int?) { } fun testTypeMismatch(a: String?, b: Any) { - doInt(a ?: b) + doInt(a ?: b) } diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.fir.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.fir.kt index a7a9efbbcb3..5af75bc0fb8 100644 --- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.fir.kt @@ -4,19 +4,19 @@ package b fun bar(i: Int) = i fun test(a: Int?, b: Int?) { - bar(if (a == null) return else b) + bar(if (a == null) return else b) } fun test(a: Int?, b: Int?, c: Int?) { - bar(if (a == null) return else if (b == null) return else c) + bar(if (a == null) return else if (b == null) return else c) } fun test(a: Any?, b: Any?, c: Int?) { - bar(if (a == null) if (b == null) c else return else return) + bar(if (a == null) if (b == null) c else return else return) } fun test(a: Int?, b: Any?, c: Int?) { - bar(if (a == null) { + bar(if (a == null) { return } else { if (b == null) { @@ -24,5 +24,5 @@ fun test(a: Int?, b: Any?, c: Int?) { } else { c } - }) + }) } diff --git a/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgument.fir.kt b/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgument.fir.kt index cbab12a2f2b..0a27998e0f1 100644 --- a/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgument.fir.kt @@ -20,19 +20,19 @@ fun main(x2: Runnable) { val x1 = {} val x3 = arrayOf() - Test.foo1({}, arrayOf()) + Test.foo1({}, arrayOf()) Test.foo1({}, *arrayOf()) - Test.foo1({}, x3) + Test.foo1({}, x3) Test.foo1({}, *arrayOf("")) - Test.foo1(x1, arrayOf()) + Test.foo1(x1, arrayOf()) Test.foo1(x1, *arrayOf()) - Test.foo1(x2, arrayOf()) + Test.foo1(x2, arrayOf()) Test.foo1(x2, *arrayOf()) - Test.foo1(x1, x3) + Test.foo1(x1, x3) Test.foo1(x1, *x3) - Test.foo1(x2, arrayOf("")) + Test.foo1(x2, arrayOf("")) Test.foo1(x2, *arrayOf("")) val i1 = Test({}, arrayOf()) @@ -42,13 +42,13 @@ fun main(x2: Runnable) { val i5 = Test({}, {}, *arrayOf("")) val i6 = Test({}, {}, arrayOf()) - i2.foo2({}, {}, arrayOf()) + i2.foo2({}, {}, arrayOf()) i2.foo2({}, {}, *arrayOf()) - i2.foo2({}, x2, arrayOf()) + i2.foo2({}, x2, arrayOf()) i2.foo2(x2, {}, *arrayOf()) - i2.foo2({}, {}, arrayOf("")) + i2.foo2({}, {}, arrayOf("")) i2.foo2({}, {}, *x3) - i2.foo2({}, x2, x3) + i2.foo2({}, x2, x3) i2.foo2(x2, {}, *arrayOf("")) } diff --git a/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentProhibited.fir.kt b/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentProhibited.fir.kt index 56210493208..417dd9ccaeb 100644 --- a/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentProhibited.fir.kt +++ b/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentProhibited.fir.kt @@ -20,19 +20,19 @@ fun main(x2: Runnable) { val x1 = {} val x3 = arrayOf() - Test.foo1({}, arrayOf()) + Test.foo1({}, arrayOf()) Test.foo1({}, *arrayOf()) Test.foo1({}, *x3) - Test.foo1({}, arrayOf("")) + Test.foo1({}, arrayOf("")) - Test.foo1(x1, arrayOf()) + Test.foo1(x1, arrayOf()) Test.foo1(x1, *arrayOf()) - Test.foo1(x2, arrayOf()) + Test.foo1(x2, arrayOf()) Test.foo1(x2, *arrayOf()) - Test.foo1(x1, x3) + Test.foo1(x1, x3) Test.foo1(x1, *x3) - Test.foo1(x2, arrayOf("")) + Test.foo1(x2, arrayOf("")) Test.foo1(x2, *arrayOf("")) val i1 = Test({}, arrayOf()) @@ -42,13 +42,13 @@ fun main(x2: Runnable) { val i5 = Test({}, {}, *arrayOf("")) val i6 = Test({}, {}, arrayOf()) - i2.foo2({}, {}, arrayOf()) + i2.foo2({}, {}, arrayOf()) i2.foo2({}, {}, *arrayOf()) - i2.foo2({}, x2, arrayOf()) + i2.foo2({}, x2, arrayOf()) i2.foo2(x2, {}, *arrayOf()) - i2.foo2({}, {}, arrayOf("")) + i2.foo2({}, {}, arrayOf("")) i2.foo2({}, {}, *x3) - i2.foo2({}, x2, x3) + i2.foo2({}, x2, x3) i2.foo2(x2, {}, *arrayOf("")) } diff --git a/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument.fir.kt b/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument.fir.kt index 04bf1ebba3b..0a831875e5a 100644 --- a/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/samConversions/arrayAsVarargAfterSamArgumentWithoutSamConversionsPerArgument.fir.kt @@ -20,19 +20,19 @@ fun main(x2: Runnable) { val x1 = {} val x3 = arrayOf() - Test.foo1({}, arrayOf()) + Test.foo1({}, arrayOf()) Test.foo1({}, *arrayOf()) Test.foo1({}, *x3) - Test.foo1({}, arrayOf("")) + Test.foo1({}, arrayOf("")) - Test.foo1(x1, arrayOf()) + Test.foo1(x1, arrayOf()) Test.foo1(x1, *arrayOf()) - Test.foo1(x2, arrayOf()) + Test.foo1(x2, arrayOf()) Test.foo1(x2, *arrayOf()) - Test.foo1(x1, x3) + Test.foo1(x1, x3) Test.foo1(x1, *x3) - Test.foo1(x2, arrayOf("")) + Test.foo1(x2, arrayOf("")) Test.foo1(x2, *arrayOf("")) val i1 = Test({}, arrayOf()) diff --git a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_disabled.fir.kt b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_disabled.fir.kt index 09d0542dfd5..68a31c07293 100644 --- a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_disabled.fir.kt +++ b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_disabled.fir.kt @@ -22,7 +22,7 @@ sealed class Case3 private constructor(val x: Int) { class Inheritor2 : Case3("Hello") } -class Case3Inheritor3 : Case3(20) // should be an error in 1.6 (?) +class Case3Inheritor3 : Case3(20) // should be an error in 1.6 (?) sealed class Case4 { protected constructor(x: Int) diff --git a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt index c601bf18f43..f905104e112 100644 --- a/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt +++ b/compiler/testData/diagnostics/tests/sealed/protectedConstructors_enabled.fir.kt @@ -22,7 +22,7 @@ sealed class Case3 private constructor(val x: Int) { class Inheritor2 : Case3("Hello") } -class Case3Inheritor3 : Case3(20) // should be an error in 1.6 (?) +class Case3Inheritor3 : Case3(20) // should be an error in 1.6 (?) sealed class Case4 { protected constructor(x: Int) diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.fir.kt index 10ec62d7609..2cc3e8ac552 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.fir.kt @@ -13,8 +13,8 @@ class A : B { foo(x.toInt(), y, myProp) x + y + myProp + parentProp + super.parentProp } - constructor(x: String, y: Int): super(x) { - foo(x, y, myProp) + constructor(x: String, y: Int): super(x) { + foo(x, y, myProp) x + y + myProp + parentProp + super.parentProp } constructor(x: B, y: Int = global2): this("", x) { diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/generics.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/generics.fir.kt index ac12d88ab30..2473ba9f297 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/generics.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/generics.fir.kt @@ -17,5 +17,5 @@ class A1 : B { } class A2 { - constructor(t: R, i: Int) : this(i, 1) + constructor(t: R, i: Int) : this(i, 1) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/generics2.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/generics2.fir.kt index 0c16f42cc5b..47870e18ba1 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/generics2.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/generics2.fir.kt @@ -14,14 +14,14 @@ class A0 { class A1 : B { constructor(x: T1, y: T2): super(x, y) - constructor(x: T1, y: Int): super(x, y) - constructor(x: T1, y: T1, z: T1): super(x, y) + constructor(x: T1, y: Int): super(x, y) + constructor(x: T1, y: T1, z: T1): super(x, y) } class A2 : B { - constructor(x: T1, y: T2): super(x, y) + constructor(x: T1, y: T2): super(x, y) constructor(x: T1, y: Int): super(x, y) - constructor(x: T1, y: T1, z: T1): super(x, y) - constructor(x: T1, y: T2, z: String): super(y, 1) + constructor(x: T1, y: T1, z: T1): super(x, y) + constructor(x: T1, y: T2, z: String): super(y, 1) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.fir.kt index d3a39f171e3..03809337f68 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.fir.kt @@ -6,7 +6,7 @@ open class Base(p: Any?) { class D: Base("") { inner class B : Base { - constructor() : super(foo1("")) + constructor() : super(foo1("")) constructor(x: Int) : super(foo1(1)) } } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.fir.kt index 2c1c4ad9613..672d0b95b96 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.fir.kt @@ -5,7 +5,7 @@ open class Base(p: Any?) { fun Base.foo() { class B : Base { - constructor() : super(foo1("")) + constructor() : super(foo1("")) constructor(x: Int) : super(foo1(1)) constructor(x: Int, y: Int) : super(this@foo.foo1(12)) constructor(x: Int, y: Int, z: Int) : super(this@B.foo1("")) diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt index e208dce08c2..96b58ce3770 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt @@ -3,5 +3,5 @@ class A { fun foo() = 1 constructor(x: Int) constructor(x: Int, y: Int, z: Int = x + foo() + this.foo()) : - this(x + foo() + this.foo()) + this(x + foo() + this.foo()) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt index 82e8f6d4025..ee8342d6e19 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt @@ -3,5 +3,5 @@ class A { val prop = 1 constructor(x: Int) constructor(x: Int, y: Int, z: Int = x + prop + this.prop) : - this(x + prop + this.prop) + this(x + prop + this.prop) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt index 21ce8d1cc69..c8c5b7abf28 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt @@ -3,5 +3,5 @@ open class B(x: Int) class A : B { val prop = 1 constructor(x: Int, y: Int = x + prop + this.prop) : - super(x + prop + this.prop) + super(x + prop + this.prop) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt index bb7f9953e6d..0112b5a8813 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt @@ -4,5 +4,5 @@ open class B(x: Int) { } class A : B { constructor(x: Int, y: Int = x + foo() + this.foo() + super.foo()) : - super(x + foo() + this.foo() + super.foo()) + super(x + foo() + this.foo() + super.foo()) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt index 3dab69e60f7..611fd7813a8 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt @@ -5,5 +5,5 @@ open class B(x: Int) { class A : B { override fun foo() = 2 constructor(x: Int, y: Int = x + foo() + this.foo() + super.foo()) : - super(x + foo() + this.foo() + super.foo()) + super(x + foo() + this.foo() + super.foo()) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt index 1303d995e52..0b52e0a30cb 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt @@ -2,5 +2,5 @@ open class B(val prop: Int) class A : B { constructor(x: Int, y: Int = x + prop + this.prop + super.prop) : - super(x + prop + this.prop + super.prop) + super(x + prop + this.prop + super.prop) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.fir.kt index 888899be4f8..f2723b50411 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.fir.kt @@ -5,11 +5,11 @@ val A.prop: Int get() = 2 class A { constructor(x: Int) - constructor() : this( - foobar() + + constructor() : this( + foobar() + this.foobar() + prop + this.prop + - this@A.prop + this@A.prop ) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.fir.kt index 490207fb280..4dfe5fc198e 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.fir.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER // !WITH_NEW_INFERENCE class X(val t: T) { - constructor(t: T, i: Int) : this(i) + constructor(t: T, i: Int) : this(i) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.fir.kt index 89b1ce9431e..13a4c35928f 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.fir.kt @@ -1,4 +1,4 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER class X { - constructor(t: T, i: Int): this(i, 1) + constructor(t: T, i: Int): this(i, 1) } diff --git a/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.fir.kt index 48a44761283..7a2cc4dc692 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/classObjectMember.fir.kt @@ -15,8 +15,8 @@ class B { fun test() { if (A.x != null) { useInt(A.x) - useInt(B.x) + useInt(B.x) } } -fun useInt(i: Int) = i \ No newline at end of file +fun useInt(i: Int) = i diff --git a/compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.fir.kt index fe045272d63..872c9199096 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.fir.kt @@ -19,7 +19,7 @@ fun bar(x: String) = x fun test(x: String?): Any { val y = My.create() val z = x ?: y!! - bar(y) + bar(y) // !! / ?. is necessary here, because y!! above may not be executed y?.hashCode() y!!.hashCode() diff --git a/compiler/testData/diagnostics/tests/smartCasts/equals.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/equals.fir.kt index 1de64d0d3b6..aec616263c4 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/equals.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/equals.fir.kt @@ -7,19 +7,19 @@ class TestWithEquals { } fun bar(i: Test?) { - if (i == null) foo(i) + if (i == null) foo(i) } fun bar(i: TestWithEquals?) { - if (i == null) foo(i) - if (null == i) foo(i) + if (i == null) foo(i) + if (null == i) foo(i) when (i) { - null -> foo(i) + null -> foo(i) } } fun gav(i: TestWithEquals?, j: TestWithEquals?) { if (j == null) { - if (i == j) foo(i) + if (i == j) foo(i) } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.fir.kt index c2269721d49..7d242f7cdd9 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.fir.kt @@ -30,7 +30,7 @@ fun test(a: A, b: B, c: C) { val k = three(a, b, c) checkSubtype(k) - checkSubtype(k) + checkSubtype(k) val l: Int = three(a, b, c) use(d, e, f, g, h, k, l) @@ -41,11 +41,11 @@ fun foo(t: T, l: MutableList): T = t fun testErrorMessages(a: A, ml: MutableList) { if (a is B && a is C) { - foo(a, ml) + foo(a, ml) } if(a is C) { - foo(a, ml) + foo(a, ml) } } @@ -53,7 +53,7 @@ fun rr(s: String?) { if (s != null) { val l = arrayListOf("", s) checkSubtype>(l) - checkSubtype>(l) + checkSubtype>(l) } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt2422.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/kt2422.fir.kt index 6040b1460de..8c1ee7d4dfa 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/kt2422.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/kt2422.fir.kt @@ -6,10 +6,10 @@ class Test { fun bar(a: Test, b: Test) { if (a.foo != null) { - useInt(b.foo) + useInt(b.foo) } if (a.foo != null) { - useInt(foo) + useInt(foo) } if (this.foo != null) { useInt(foo) diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt2865.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/kt2865.fir.kt index 8bb32d4e48a..901cbc1fb40 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/kt2865.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/kt2865.fir.kt @@ -7,6 +7,6 @@ fun foo(a: MutableMap, x: String?) { } fun foo1(a: MutableMap, x: String?) { - a[x] = x!! + a[x] = x!! a[x!!] = x } diff --git a/compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.fir.kt index c24ca8ed274..124d529aeb3 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.fir.kt @@ -11,14 +11,14 @@ val i: Int? = 1 class A(val i: Int?) { fun testUseFromClass() { if (foo.i != null) { - useInt(i) + useInt(i) } } } fun testUseFromOtherPackage() { if (bar.i != null) { - useInt(i) + useInt(i) } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.fir.kt index fd23b53d520..1a0da886e31 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.fir.kt @@ -3,4 +3,4 @@ fun Any?.foo(my: My) = my === this class My(val x: Any) // my is nullable in brackets because Any?.foo has nullable receiver -fun foo(my: My?) = my?.x.foo(my) \ No newline at end of file +fun foo(my: My?) = my?.x.foo(my) diff --git a/compiler/testData/diagnostics/tests/smartCasts/throwInTry.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/throwInTry.fir.kt index b9d6ac6f20d..acac8f86dfb 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/throwInTry.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/throwInTry.fir.kt @@ -50,7 +50,7 @@ fun conditionalThrowInTry_noSmartcastAfterTryCatch(a: A) { throw AssertionError() } } catch (e: Throwable) {} - takeB(a) + takeB(a) } fun conditionalThrowInTry_rethrow_smartcastAfterTryCatch(a: A) { @@ -61,7 +61,7 @@ fun conditionalThrowInTry_rethrow_smartcastAfterTryCatch(a: A) { } catch (e: Throwable) { throw e } - takeB(a) + takeB(a) } fun conditionalThrowInTry_rethrow_smartcastAfterTryCatchFinally(a: A) { @@ -72,7 +72,7 @@ fun conditionalThrowInTry_rethrow_smartcastAfterTryCatchFinally(a: A) { } catch (e: Throwable) { throw e } finally {} - takeB(a) + takeB(a) } fun conditionalThrowInTry_rethrow_noSmartcastInFinally(a: A) { @@ -83,6 +83,6 @@ fun conditionalThrowInTry_rethrow_noSmartcastInFinally(a: A) { } catch (e: Throwable) { throw e } finally { - takeB(a) + takeB(a) } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt index 770d9dd55df..e3135c0c7a7 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.fir.kt @@ -6,6 +6,6 @@ public fun foo() { var s: Any = "not null" if (s is String) { s = 42 - bar(s) + bar(s) } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.fir.kt index 3d667d5f787..470ad17d171 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.fir.kt @@ -6,5 +6,5 @@ fun foo(x: Int, f: () -> Unit, y: Int) {} fun bar() { var x: Int? x = 4 - foo(x, { x = null; x.hashCode() }, x) + foo(x, { x = null; x.hashCode() }, x) } diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/property.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/property.fir.kt index b12b92d08c8..a98e9f3fe82 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/property.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/property.fir.kt @@ -7,5 +7,5 @@ fun bar(s: String): Int { fun foo(m: MyClass): Int { m.p = "xyz" - return bar(m.p) + return bar(m.p) } diff --git a/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt b/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt index 3b949012032..054bfda7853 100644 --- a/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt +++ b/compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.fir.kt @@ -38,5 +38,5 @@ class W: B(), Z fun test2(w: W) { eatAString(w) - eatAStringN(w) + eatAStringN(w) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/suspendConversion/basicSuspendConversion.fir.kt b/compiler/testData/diagnostics/tests/suspendConversion/basicSuspendConversion.fir.kt index da4be44f525..ef2b4fa529f 100644 --- a/compiler/testData/diagnostics/tests/suspendConversion/basicSuspendConversion.fir.kt +++ b/compiler/testData/diagnostics/tests/suspendConversion/basicSuspendConversion.fir.kt @@ -18,6 +18,6 @@ fun test( foo2(f2) foo3(f3) - foo1(f2) - foo1(f3) + foo1(f2) + foo1(f3) } diff --git a/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionDisabled.fir.kt b/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionDisabled.fir.kt index fb5b1104d95..28447bee963 100644 --- a/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionDisabled.fir.kt +++ b/compiler/testData/diagnostics/tests/suspendConversion/suspendConversionDisabled.fir.kt @@ -22,6 +22,6 @@ fun test( foo1(::bar) - foo1(f2) - foo1(f3) + foo1(f2) + foo1(f3) } diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.fir.kt index 99d47ef1928..b4fa44d5245 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.fir.kt @@ -23,7 +23,7 @@ fun foo(k: KotlinClass) { k.setSomething4("") k.something4 += "" - k.setSomething4(null) + k.setSomething4(null) k.something4 = null useString(k.getSomething5()) diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt index e49e9eba107..2730e8314f6 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.fir.kt @@ -1,7 +1,7 @@ // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): String { - return javaClass.doSomething("", 1) { s: String -> "" } + return javaClass.doSomething("", 1) { s: String -> "" } } // FILE: JavaClass.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt index 029ab9b26da..a5dff1d25d7 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.fir.kt @@ -1,7 +1,7 @@ // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): String { - return javaClass.doSomething("") { it } + return javaClass.doSomething("") { it } } // FILE: JavaClass.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt index 036f6bcf97f..dc9c84221df 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.fir.kt @@ -1,8 +1,8 @@ // JAVAC_EXPECTED_FILE // FILE: KotlinFile.kt fun foo(javaClass: JavaClass) { - val a: String = javaClass.doSomething1("", 1) { p: String -> p } - val b: String = javaClass.doSomething2("", 1, true) { p: Int -> p } + val a: String = javaClass.doSomething1("", 1) { p: String -> p } + val b: String = javaClass.doSomething2("", 1, true) { p: Int -> p } } // FILE: JavaClass.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.fir.kt index 7d1d24a3487..4aed075a786 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.fir.kt @@ -2,7 +2,7 @@ // FILE: KotlinFile.kt fun foo(javaClass: JavaClass): Int { val inner = javaClass.createInner() - return inner.doSomething(1, "") { } + return inner.doSomething(1, "") { } } // FILE: JavaClass.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.fir.kt index a800a633332..f7bdb35c13a 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.fir.kt @@ -1,8 +1,8 @@ // !WITH_NEW_INFERENCE // FILE: KotlinFile.kt fun foo(javaInterface: JavaInterface) { - javaInterface.doIt(null) { } - javaInterface.doIt("", null) + javaInterface.doIt(null) { } + javaInterface.doIt("", null) } // FILE: JavaInterface.java diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.fir.kt index aa494b9e7e5..a2e2a2f4d66 100644 --- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.fir.kt +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.fir.kt @@ -16,8 +16,8 @@ fun foo(javaClass: JavaClass, kotlinClass: KotlinClass) { bar() } - javaClass.doSomething2 { - bar() + javaClass.doSomething2 { + bar() } } diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt index 49c3fbfc73b..17fca7ffac3 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.fir.kt @@ -8,9 +8,9 @@ val concurrentHash: ConcurrentHashMap = null!! fun foo() { concurrent.remove("", 1) - concurrent.remove("", "") + concurrent.remove("", "") concurrentHash.remove("", 1) - concurrentHash.remove("", "") + concurrentHash.remove("", "") // Flexible types concurrent.remove(null, 1) diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.fir.kt index 77dc6f828de..63d48ffc6f3 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.fir.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.fir.kt @@ -32,7 +32,7 @@ abstract class MyIt7 : Iterator { fun foo(x: Iterator, y: Iterator) { - x.forEachRemaining(null) + x.forEachRemaining(null) x.forEachRemaining { it -> it.length } x.forEachRemaining { it -> it?.length } diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.fir.kt index b4b0ecc3eae..2d940ccf600 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.fir.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.fir.kt @@ -4,17 +4,17 @@ abstract class A : Map fun foo(x: Map, a: A, b: java.util.HashMap) { x.getOrDefault(1, "") - x.getOrDefault("", "") - x.getOrDefault(1, 2) - x.getOrDefault("", 2) + x.getOrDefault("", "") + x.getOrDefault(1, 2) + x.getOrDefault("", 2) a.getOrDefault(1, "") - a.getOrDefault("", "") - a.getOrDefault(1, 2) - a.getOrDefault("", 2) + a.getOrDefault("", "") + a.getOrDefault(1, 2) + a.getOrDefault("", 2) b.getOrDefault(1, "") - b.getOrDefault("", "") - b.getOrDefault(1, 2) - b.getOrDefault("", 2) + b.getOrDefault("", "") + b.getOrDefault(1, 2) + b.getOrDefault("", 2) } diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.kt index 80bfe7c919c..001df3f2519 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.fir.kt @@ -18,14 +18,14 @@ class KotlinMap2 : java.util.AbstractMap() { fun foo(x: MutableMap, y: java.util.HashMap, z: java.util.AbstractMap) { x.remove("", 1) - x.remove("", "") - x.remove("", null) + x.remove("", "") + x.remove("", null) y.remove("", 1) - y.remove("", "") + y.remove("", "") y.remove("", null) z.remove("", 1) - z.remove("", "") + z.remove("", "") z.remove("", null) } diff --git a/compiler/testData/diagnostics/tests/typeParameters/kt42396.fir.kt b/compiler/testData/diagnostics/tests/typeParameters/kt42396.fir.kt index 2f2dee34a5d..946fe50c23f 100644 --- a/compiler/testData/diagnostics/tests/typeParameters/kt42396.fir.kt +++ b/compiler/testData/diagnostics/tests/typeParameters/kt42396.fir.kt @@ -13,5 +13,5 @@ fun wrapAAndBToOut(x: F): Out where F : A, F : B = Out() fun main(a: A) { val x: Out = materializeOutOfAAndB() // OI: inferred type A is not a subtype of B; `F` is instantiated as `A`, so upper bounds was violated val y: Inv = materializeInvOfAAndB() // OI and NI: required B, found A - val z: Out = wrapAAndBToOut(a) // OI and NI: required B, found A + val z: Out = wrapAAndBToOut(a) // OI and NI: required B, found A } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt b/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt index 92c6786e45c..8c4b1df4396 100644 --- a/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt @@ -4,7 +4,7 @@ class Num(val x: T) typealias N = Num typealias N2 = N -val x1 = Num("") +val x1 = Num("") val x2 = N("") val x3 = N2("") diff --git a/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt b/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt index c18d9f69a1e..b0081a293f8 100644 --- a/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt @@ -6,7 +6,7 @@ typealias Array2D = Array> fun foo1(a: Array2D) = a fun bar1(a: Array2D) = - foo1(a) + foo1(a) typealias TMap = Map @@ -14,4 +14,4 @@ typealias TMap = Map fun foo2(m: TMap) = m fun bar2(m: TMap<*>) = - foo2(m) + foo2(m) diff --git a/compiler/testData/diagnostics/tests/typealias/starProjection.fir.kt b/compiler/testData/diagnostics/tests/typealias/starProjection.fir.kt index a760eb31598..76e97407452 100644 --- a/compiler/testData/diagnostics/tests/typealias/starProjection.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/starProjection.fir.kt @@ -10,6 +10,6 @@ fun test2(x: Map) = check(x) fun test3(x: Map) = check(x).size -fun test4(x: Map) = check(x)["42"] +fun test4(x: Map) = check(x)["42"] -fun test5(x: Map) = check(x)[42] +fun test5(x: Map) = check(x)[42] diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt index 23887da1590..2ea38ab934a 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt @@ -11,6 +11,6 @@ fun listOf(): List = null!! // Unresolved reference is ok here: // we can't create a substituted signature for type alias constructor // since it has 'out' type projection in 'in' position. -val test1 = BOutIn(listOf(), null!!) +val test1 = BOutIn(listOf(), null!!) val test2 = BInIn(listOf(), null!!) diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt index b7008cf51e6..7a88b7d993a 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt @@ -12,8 +12,8 @@ class Cons(val head: T, val tail: Cons?) typealias C = Cons typealias CC = C> -val test2 = C(1, 2) -val test3 = CC(1, 2) +val test2 = C(1, 2) +val test3 = CC(1, 2) val test4 = CC(C(1, null), null) @@ -21,13 +21,13 @@ class Pair(val x: X, val y: Y) typealias PL = Pair> typealias PN = Pair> -val test5 = PL(1, null) +val test5 = PL(1, null) class Foo(val p: Pair) typealias F = Foo -fun testProjections1(x: Pair) = F(x) -fun testProjections2(x: Pair) = F(x) -fun testProjections3(x: Pair) = F(x) -fun testProjections4(x: Pair) = F(x) +fun testProjections1(x: Pair) = F(x) +fun testProjections2(x: Pair) = F(x) +fun testProjections3(x: Pair) = F(x) +fun testProjections4(x: Pair) = F(x) diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.fir.kt index d46ab13a6f4..79aee5579fc 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.fir.kt @@ -10,11 +10,11 @@ open class MyClass private constructor(val x: Int) { typealias MyAlias = MyClass -val test1 = MyAlias(1) -val test1a = MyClass(1) +val test1 = MyAlias(1) +val test1a = MyClass(1) -val test2 = MyAlias("") -val test2a = MyClass("") +val test2 = MyAlias("") +val test2a = MyClass("") val test3 = MyAlias(1.0) val test3a = MyClass(1.0) diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.fir.kt index bb0c017ef31..79972549f79 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.fir.kt @@ -20,5 +20,5 @@ val test2 = WI(null) val test3 = CWI() val test4 = CWI("") -val test5 = CWI(null) -val test5a = ClassWithCompanionObjectWithInvoke(null) +val test5 = CWI(null) +val test5a = ClassWithCompanionObjectWithInvoke(null) diff --git a/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt b/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt index d321469fd3b..4d9f140bfed 100644 --- a/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt @@ -22,7 +22,7 @@ val test3p2 = P2(1, 1) val test0pr = PR(1, "") val test1pr = PR(1, "") -val test2pr = PR(1, "") +val test2pr = PR(1, "") val test2pra = PR(1, "") val test3pr = P2(1, "") @@ -38,5 +38,5 @@ class MyPair(val string: T1, val number: T2) typealias MP = MyPair val testMP0 = MP("", 1) -val testMP1 = MP(1, "") +val testMP1 = MP(1, "") val testMP2 = MP("", "") diff --git a/compiler/testData/diagnostics/tests/unitConversion/chainedFunSuspendUnitConversion.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/chainedFunSuspendUnitConversion.fir.kt index ba4a1583d71..1d630c5d007 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/chainedFunSuspendUnitConversion.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/chainedFunSuspendUnitConversion.fir.kt @@ -12,7 +12,7 @@ fun bar(): String = "" abstract class SubInt : () -> Int fun test(f: () -> String, s: SubInt) { - foo(f) - foo(s) + foo(f) + foo(s) foo(::bar) } diff --git a/compiler/testData/diagnostics/tests/unitConversion/chainedFunUnitConversion.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/chainedFunUnitConversion.fir.kt index 663d9bc3718..f16b065ee34 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/chainedFunUnitConversion.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/chainedFunUnitConversion.fir.kt @@ -10,6 +10,6 @@ fun foo(r: KRunnable) {} abstract class SubInt : () -> Int fun test(f: () -> Int, s: SubInt) { - foo(f) - foo(s) + foo(f) + foo(s) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/unitConversion/chainedUnitSuspendConversion.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/chainedUnitSuspendConversion.fir.kt index fc807ad7dd3..e541778711c 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/chainedUnitSuspendConversion.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/chainedUnitSuspendConversion.fir.kt @@ -9,6 +9,6 @@ abstract class SubInt : () -> Int fun test(g: () -> Double, s: SubInt) { foo(::bar) - foo(g) - foo(s) + foo(g) + foo(s) } diff --git a/compiler/testData/diagnostics/tests/unitConversion/unitConversionCompatibility.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/unitConversionCompatibility.fir.kt index f8db62e5ae8..ca60944607b 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/unitConversionCompatibility.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/unitConversionCompatibility.fir.kt @@ -23,7 +23,7 @@ object Test2 { fun foo(f: KRunnable) {} fun test(f: () -> Int) { - foo(f) + foo(f) } } } diff --git a/compiler/testData/diagnostics/tests/unitConversion/unitConversionDisabledForSimpleArguments.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/unitConversionDisabledForSimpleArguments.fir.kt index 9e6eda14483..947c2add77d 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/unitConversionDisabledForSimpleArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/unitConversionDisabledForSimpleArguments.fir.kt @@ -15,8 +15,8 @@ fun test(f: () -> String, g: () -> Nothing, h: () -> Nothing?, s: SubInt) { foo({ TODO() }.freeze()) foo(g) - foo(h) + foo(h) - foo(f) - foo(s) + foo(f) + foo(s) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/unitConversion/unitConversionForAllKinds.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/unitConversionForAllKinds.fir.kt index ce697bd68b2..706990943ce 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/unitConversionForAllKinds.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/unitConversionForAllKinds.fir.kt @@ -10,7 +10,7 @@ fun createCall(): () -> Int = TODO() fun test(g: () -> String, h: (Float) -> String) { foo(::bar) foo { "something" } - foo(g) + foo(g) - fooGeneric(h) + fooGeneric(h) } diff --git a/compiler/testData/diagnostics/tests/unitConversion/unitConversionForSubtypes.fir.kt b/compiler/testData/diagnostics/tests/unitConversion/unitConversionForSubtypes.fir.kt index 237022dddfe..74258132220 100644 --- a/compiler/testData/diagnostics/tests/unitConversion/unitConversionForSubtypes.fir.kt +++ b/compiler/testData/diagnostics/tests/unitConversion/unitConversionForSubtypes.fir.kt @@ -7,16 +7,16 @@ abstract class SubInt : (Int, String) -> Int abstract class SubIntWrong : (String, String) -> Int fun test1(s: SubInt, sWrong: SubIntWrong) { - foo(s) - foo(sWrong) + foo(s) + foo(sWrong) val a = "foo" - foo(a) + foo(a) a as (Int, String) -> String - foo(a) + foo(a) } fun test2(x: T) where T : (Int, String) -> Int, T : (Double) -> Int { - foo(x) -} \ No newline at end of file + foo(x) +} diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt index 41cfd451177..0503e7a49ec 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt @@ -43,27 +43,27 @@ fun takeUIntWithoutAnnotaion(u: UInt) {} fun takeIntWithoutAnnotation(i: Int) {} fun test() { - takeUByte(IMPLICIT_INT) - takeUByte(EXPLICIT_INT) + takeUByte(IMPLICIT_INT) + takeUByte(EXPLICIT_INT) - takeUShort(IMPLICIT_INT) - takeUShort(BIGGER_THAN_UBYTE) + takeUShort(IMPLICIT_INT) + takeUShort(BIGGER_THAN_UBYTE) - takeUInt(IMPLICIT_INT) + takeUInt(IMPLICIT_INT) - takeULong(IMPLICIT_INT) + takeULong(IMPLICIT_INT) - takeUBytes(IMPLICIT_INT, EXPLICIT_INT, 42u) + takeUBytes(IMPLICIT_INT, EXPLICIT_INT, 42u) - takeLong(IMPLICIT_INT) + takeLong(IMPLICIT_INT) takeIntWithoutAnnotation(IMPLICIT_INT) takeUIntWithoutAnnotaion(UINT_CONST) - takeUByte(LONG_CONST) - takeUByte(NON_CONST) - takeUByte(BIGGER_THAN_UBYTE) - takeUByte(UINT_CONST) - takeUIntWithoutAnnotaion(IMPLICIT_INT) + takeUByte(LONG_CONST) + takeUByte(NON_CONST) + takeUByte(BIGGER_THAN_UBYTE) + takeUByte(UINT_CONST) + takeUIntWithoutAnnotaion(IMPLICIT_INT) } diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt index 7b1e8c134a6..a54ea46fbde 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt @@ -11,10 +11,10 @@ fun takeUByte(u: UByte) {} fun foo() { select(1, 1u) checkType { _>() } - takeUByte(id(1)) + takeUByte(id(1)) 1 + 1u (1u + 1) checkType { _() } - id(1) + id(1) } diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt index 0c918bf0301..8569081069a 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt @@ -11,47 +11,47 @@ fun takeUBytes(vararg u: UByte) {} fun takeNullableUInt(u: UInt?) {} fun test() { - takeUInt(1 + 2) - takeUInt(1.plus(2)) - takeNullableUInt(4) + takeUInt(1 + 2) + takeUInt(1.plus(2)) + takeNullableUInt(4) - takeUInt(Int.MAX_VALUE * 2L) - takeUInt(-1) - takeUInt(Int.MAX_VALUE * 2L + 2) + takeUInt(Int.MAX_VALUE * 2L) + takeUInt(-1) + takeUInt(Int.MAX_VALUE * 2L + 2) - takeUByte(1) - takeUByte(255) - takeUByte(1.toByte()) + takeUByte(1) + takeUByte(255) + takeUByte(1.toByte()) - takeUShort(1) - takeUInt(1) - takeULong(1) + takeUShort(1) + takeUInt(1) + takeULong(1) takeULong(18446744073709551615) - takeULong(1844674407370955161) + takeULong(1844674407370955161) takeULong(18446744073709551615u) - takeUInt(Int.MAX_VALUE * 2) - takeUInt(4294967294) + takeUInt(Int.MAX_VALUE * 2) + takeUInt(4294967294) - takeUBytes(1, 2, 255, 256, 0, -1, 40 + 2) + takeUBytes(1, 2, 255, 256, 0, -1, 40 + 2) - takeUInt(1.myPlus(2)) + takeUInt(1.myPlus(2)) val localVariable = 42 - takeUInt(localVariable) + takeUInt(localVariable) var localMutableVariable = 42 - takeUInt(localMutableVariable) + takeUInt(localMutableVariable) val localNegativeVariable = -1 - takeUInt(localNegativeVariable) + takeUInt(localNegativeVariable) - takeUInt(globalVariable) + takeUInt(globalVariable) - takeUInt(constVal) + takeUInt(constVal) - takeUInt(globalVariableWithGetter) + takeUInt(globalVariableWithGetter) } val globalVariable = 10 diff --git a/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.fir.kt b/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.fir.kt index 454b4716190..ad9295cb666 100644 --- a/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.fir.kt @@ -31,8 +31,8 @@ fun getArr(): Array? = null fun f() { A().foo(1, *args) - bar(2, *args) - baz(*args) + bar(2, *args) + baz(*args) } fun g(args: Array?) { @@ -55,8 +55,8 @@ fun h(b: B) { fun k() { A().foo(1, *getArr()) - bar(2, *getArr()) - baz(*getArr()) + bar(2, *getArr()) + baz(*getArr()) } fun invokeTest(goodArgs: Array) { diff --git a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt index 56098cdc698..86691dfabc5 100644 --- a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt @@ -10,13 +10,13 @@ fun withVararg(vararg s: String) {} fun foo() {} fun test_fun(s: String, arr: Array) { - withVararg(arr) // Error + withVararg(arr) // Error withVararg(*arr) // OK withVararg(s = arr) // Error withVararg(s = *arr) // OK withVararg(s) // OK - withVararg(s = s) // Error + withVararg(s = s) // Error } fun test_ann(s: String, arr: Array) { diff --git a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_4.fir.kt b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_4.fir.kt index 971e060e747..63fd72c7599 100644 --- a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_4.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_4.fir.kt @@ -10,13 +10,13 @@ fun withVararg(vararg s: String) {} fun foo() {} fun test_fun(s: String, arr: Array) { - withVararg(arr) // Error + withVararg(arr) // Error withVararg(*arr) // OK withVararg(s = arr) // OK withVararg(s = *arr) // Warning withVararg(s) // OK - withVararg(s = s) // Error + withVararg(s = s) // Error } fun test_ann(s: String, arr: Array) { diff --git a/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.fir.kt b/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.fir.kt index 93696283bf2..7b1615467ed 100644 --- a/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.fir.kt @@ -15,10 +15,10 @@ annotation class Ann(vararg val s: String) @Ann(s = arrayOf()) fun test1() {} -@Ann(s = intArrayOf()) +@Ann(s = intArrayOf()) fun test2() {} -@Ann(s = arrayOf(1)) +@Ann(s = arrayOf(1)) fun test3() {} @Ann("value1", "value2") diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.fir.kt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.fir.kt index 464a298a01e..4349a317c6c 100644 --- a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_after.fir.kt @@ -53,8 +53,8 @@ fun testMany(a: Any) { manyFoo(s = "") manyFoo(a) - manyFoo(v = a) - manyFoo(s = a) - manyFoo(v = a as Int) - manyFoo(s = a as String) + manyFoo(v = a) + manyFoo(s = a) + manyFoo(v = a as Int) + manyFoo(s = a as String) } diff --git a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.fir.kt b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.fir.kt index a2e2455a240..af7880ac0f1 100644 --- a/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation_before.fir.kt @@ -53,8 +53,8 @@ fun testMany(a: Any) { manyFoo(s = "") manyFoo(a) - manyFoo(v = a) - manyFoo(s = a) - manyFoo(v = a as Int) - manyFoo(s = a as String) + manyFoo(v = a) + manyFoo(s = a) + manyFoo(v = a as Int) + manyFoo(s = a as String) } diff --git a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt index 1a2627826f7..8381c0b7e0c 100644 --- a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.fir.kt @@ -15,10 +15,10 @@ annotation class Ann(vararg val s: String) @Ann(s = arrayOf()) fun test1() {} -@Ann(s = intArrayOf()) +@Ann(s = intArrayOf()) fun test2() {} -@Ann(s = arrayOf(1)) +@Ann(s = arrayOf(1)) fun test3() {} @Ann(s = ["value"]) diff --git a/compiler/testData/diagnostics/tests/varargs/varargsAndPair.fir.kt b/compiler/testData/diagnostics/tests/varargs/varargsAndPair.fir.kt index cc2a581ceb8..7cd3700ad14 100644 --- a/compiler/testData/diagnostics/tests/varargs/varargsAndPair.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/varargsAndPair.fir.kt @@ -6,5 +6,5 @@ class Pair(a: A) fun test() { val v = foo(Pair(1)) - checkSubtype(v) // check that it is not error type + checkSubtype(v) // check that it is not error type } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/when/kt10439.fir.kt b/compiler/testData/diagnostics/tests/when/kt10439.fir.kt index c30fc705cc3..87de67c97e7 100644 --- a/compiler/testData/diagnostics/tests/when/kt10439.fir.kt +++ b/compiler/testData/diagnostics/tests/when/kt10439.fir.kt @@ -14,12 +14,12 @@ fun foo(x: Int) = x fun test0(flag: Boolean) { - foo(if (flag) true else "") + foo(if (flag) true else "") } fun test1(flag: Boolean) { - foo(when (flag) { + foo(when (flag) { true -> true else -> "" - }) + }) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/addAllProjection.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/addAllProjection.fir.kt index 502b2d7dc9a..808ca550b9c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/addAllProjection.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/addAllProjection.fir.kt @@ -3,12 +3,12 @@ fun test(mc: MutableCollection) { mc.addAll(mc) - mc.addAll(arrayListOf()) + mc.addAll(arrayListOf()) mc.addAll(arrayListOf()) - mc.addAll(listOf("")) - mc.addAll(listOf("")) - mc.addAll(listOf("")) + mc.addAll(listOf("")) + mc.addAll(listOf("")) + mc.addAll(listOf("")) mc.addAll(emptyList()) mc.addAll(emptyList()) diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.fir.kt index 58e77fcb919..e4cc980f080 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.fir.kt @@ -6,7 +6,7 @@ annotation class Ann(val i: IntArray) @Ann(intArrayOf(i2)) @Ann(intArrayOf(i3)) @Ann(intArrayOf(i, i2, i3)) -@Ann(intArrayOf(intArrayOf(i, i2, i3))) +@Ann(intArrayOf(intArrayOf(i, i2, i3))) class Test var i = 1 diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.fir.kt index 4d9dec1b658..7a5f9cd9e05 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.fir.kt @@ -6,6 +6,6 @@ public @interface A { } // FILE: b.kt -@A(*arrayOf(1, "b")) +@A(*arrayOf(1, "b")) fun test() { } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.fir.kt index c2424ad10b4..e40d885f3df 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.fir.kt @@ -2,6 +2,6 @@ annotation class B(vararg val args: String) -@B(*arrayOf(1, "b")) +@B(*arrayOf(1, "b")) fun test() { } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.fir.kt index a1b34642fdd..3a442cbe244 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.fir.kt @@ -14,7 +14,7 @@ class MyClass1 @Ann1(arrayOf(Any::class)) class MyClass1a -@Ann1(arrayOf(B1::class)) +@Ann1(arrayOf(B1::class)) class MyClass2 annotation class Ann2(val arg: Array>) @@ -25,5 +25,5 @@ class MyClass3 @Ann2(arrayOf(B1::class)) class MyClass4 -@Ann2(arrayOf(B2::class)) +@Ann2(arrayOf(B2::class)) class MyClass5 diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.fir.kt index 11bce1bb6b5..d7c81d3d00a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.fir.kt @@ -11,7 +11,7 @@ annotation class Ann1(val arg: Array>) @Ann1(arrayOf(A::class)) class MyClass1 -@Ann1(arrayOf(Any::class)) +@Ann1(arrayOf(Any::class)) class MyClass1a @Ann1(arrayOf(B1::class)) @@ -19,11 +19,11 @@ class MyClass2 annotation class Ann2(val arg: Array>) -@Ann2(arrayOf(A::class)) +@Ann2(arrayOf(A::class)) class MyClass3 @Ann2(arrayOf(B1::class)) class MyClass4 -@Ann2(arrayOf(B2::class)) +@Ann2(arrayOf(B2::class)) class MyClass5 diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.fir.kt index f73ba7764ee..bccf4b7247f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.fir.kt @@ -12,7 +12,7 @@ class MyClass1 @Ann1(Any::class) class MyClass1a -@Ann1(B1::class) +@Ann1(B1::class) class MyClass2 annotation class Ann2(val arg: KClass) @@ -23,5 +23,5 @@ class MyClass3 @Ann2(B1::class) class MyClass4 -@Ann2(B2::class) +@Ann2(B2::class) class MyClass5 diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.fir.kt index 64ecb487ef4..6db9d2a03a0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.fir.kt @@ -9,7 +9,7 @@ annotation class Ann1(val arg: KClass) @Ann1(A::class) class MyClass1 -@Ann1(Any::class) +@Ann1(Any::class) class MyClass1a @Ann1(B1::class) @@ -17,11 +17,11 @@ class MyClass2 annotation class Ann2(val arg: KClass) -@Ann2(A::class) +@Ann2(A::class) class MyClass3 @Ann2(B1::class) class MyClass4 -@Ann2(B2::class) +@Ann2(B2::class) class MyClass5 diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.fir.kt index de094f1cce6..a3574aa666c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.fir.kt @@ -8,15 +8,15 @@ annotation class Ann1(val arg: KClass) @Ann1(A::class) class MyClass1 -@Ann1(Any::class) +@Ann1(Any::class) class MyClass1a -@Ann1(B::class) +@Ann1(B::class) class MyClass2 annotation class Ann2(val arg: KClass) -@Ann2(A::class) +@Ann2(A::class) class MyClass3 @Ann2(B::class) diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.fir.kt index 412093c90fe..f8055aefa28 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.fir.kt @@ -6,8 +6,8 @@ public @interface A { } // FILE: b.kt -@A(false, +@A(false, 1.0, -false) fun foo1() {} +false) fun foo1() {} -@A(2.0, x = true, b = 2.0) fun foo2() {} +@A(2.0, x = true, b = 2.0) fun foo2() {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.fir.kt index 18ffdb6b2f3..8d756c88dc0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.fir.kt @@ -14,6 +14,6 @@ fun myRun(block: () -> T): T { fun foo(x: Int): Int = x + 1 fun typeMismatchInLambda(y: String): Int { - val x = myRun { foo(y) } + val x = myRun { foo(y) } return x } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/kt36818.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/kt36818.fir.kt index 100afc833b4..669438916b9 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/kt36818.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/kt36818.fir.kt @@ -1,7 +1,7 @@ fun main(x1: Double?, range: ClosedRange) { when (x1) { null -> throw Exception() - in range -> {} // error, no smartcast from previous branch, OK in OI + in range -> {} // error, no smartcast from previous branch, OK in OI } when { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt index 93bc5b88964..f829ef04e8f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt @@ -11,24 +11,24 @@ fun generate(g: suspend Controller.() -> Unit): S = TODO() val test1 = generate { apply { - yield(4) + yield(4) } } val test2 = generate { - yield(B) + yield(B) apply { - yield(C) + yield(C) } } val test3 = generate { this.let { - yield(B) + yield(B) } apply { - yield(C) + yield(C) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionsWithNonValuableConstraints_1_2.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionsWithNonValuableConstraints_1_2.fir.kt index ad18793da9d..030107672a2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionsWithNonValuableConstraints_1_2.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionsWithNonValuableConstraints_1_2.fir.kt @@ -12,6 +12,6 @@ fun generate(g: suspend Controller.() -> Unit): S = TODO() suspend fun Base.baseExtension() {} val test1 = generate { - yield("foo") + yield("foo") baseExtension() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/inferCoroutineTypeInOldVersion.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/inferCoroutineTypeInOldVersion.fir.kt index dcb7ce0f233..b80ff0e4fd0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/inferCoroutineTypeInOldVersion.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/inferCoroutineTypeInOldVersion.fir.kt @@ -14,17 +14,17 @@ fun Builder.extensionAdd(s: S) {} suspend fun Builder.safeExtensionAdd(s: S) {} val member = build { - add(42) + add(42) } val memberWithoutAnn = wrongBuild { - add(42) + add(42) } val extension = build { - extensionAdd("foo") + extensionAdd("foo") } val safeExtension = build { - safeExtensionAdd("foo") + safeExtensionAdd("foo") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt index abafc519962..40b6129a5c5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt @@ -20,8 +20,8 @@ suspend fun yield() {} fun test() { builder { - send(run { + send(run { yield() // No error but `yield` is not inside "suspension" context actually - }) + }) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt index 73f2e088755..83353ec36e7 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt @@ -24,7 +24,7 @@ suspend fun foo(x: Int) = flow { var newValue = 1 newValue += listOf().asSequence().fold(0) { total, next -> - call(11) + call(11) total + next } newValue += listOf().asSequence().fold(0, fun(total, next): Int { return total + next }) diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignWithLambda.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignWithLambda.fir.kt index 6a393ec0908..af677bc41dd 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignWithLambda.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignWithLambda.fir.kt @@ -9,7 +9,7 @@ fun call(x: String) {} fun foo(x: Float, y: Float) = { var newValue = 1 newValue += listOf().asSequence().fold(0) { total, next -> - call(11) + call(11) total + next } newValue += listOf().asSequence().fold(0, fun(total, next): Int { return total + next }) @@ -26,7 +26,7 @@ fun id(x: T) = x fun foo2() = { var x = A() - x += { "" } + x += { "" } var y = A() y += 1 } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/resolveUsualCallWithBuilderInference.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/resolveUsualCallWithBuilderInference.fir.kt index a03169e2e17..76fa4fb0803 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/resolveUsualCallWithBuilderInference.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/resolveUsualCallWithBuilderInference.fir.kt @@ -25,7 +25,7 @@ val member = build { } val memberWithoutAnn = wrongBuild { - add(42) + add(42) } val extension = build { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.fir.kt index 5cb3cc89a30..c0a1aeee3d5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/suspendCallsWrongUpperBound.fir.kt @@ -9,5 +9,5 @@ class Controller { fun generate(g: suspend Controller.() -> Unit): S = TODO() val test = generate { - yield("foo") + yield("foo") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt index 5fe162f1c98..67d9f1db67e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.fir.kt @@ -9,7 +9,7 @@ class GenericController { fun generate(g: suspend GenericController.(S) -> Unit): S = TODO() val test1 = generate { - yield(4) + yield(4) } val test2 = generate { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt37309.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt37309.fir.kt index c97c28694cc..67afccd697d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt37309.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt37309.fir.kt @@ -12,12 +12,12 @@ fun myBuildList(@BuilderInference builderAction: MutableList.() -> Unit) fun main() { val newList1 = myBuildList { addAll( - listOf(1).map { Foo(null) } + listOf(1).map { Foo(null) } ) } val newList2 = buildList { - addAll(listOf(1,2,3).map{ Foo(null) }) + addAll(listOf(1,2,3).map{ Foo(null) }) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.fir.kt index f065c107b35..988fcda25db 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.fir.kt @@ -19,7 +19,7 @@ class Controller { suspend fun yieldString(value: String) = suspendCoroutineUninterceptedOrReturn { it.resume(1) it checkType { _>() } - it.resume("") + it.resume("") // We can return anything here, 'suspendCoroutineUninterceptedOrReturn' is not very type-safe // Also we can call resume and then return the value too, but it's still just our problem diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.fir.kt index 9a5ad755e6c..80fb3b0e80c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.fir.kt @@ -22,7 +22,7 @@ fun test() { builder { noParams() yieldString("abc") checkType { _() } - yieldString(1) checkType { _() } + yieldString(1) checkType { _() } await { "123" } checkType { _() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.fir.kt index 31da9e048d3..09adccbbf6c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.fir.kt @@ -7,7 +7,7 @@ fun useFn(fn: () -> Unit) = fn fun ambiguous(sfn: suspend () -> Unit) = sfn fun ambiguous(fn: () -> Unit) = fn -fun test1(sfn: suspend () -> Unit) = useFn(sfn) +fun test1(sfn: suspend () -> Unit) = useFn(sfn) fun test2(fn: () -> Unit) = useSuspendFn(fn) fun test3(sfn: suspend () -> Unit) = useSuspendFn(sfn) diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.fir.kt index 2663d0780de..02d1088e025 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.fir.kt @@ -22,7 +22,7 @@ fun test() { builder { noParams() yieldString("abc") checkType { _() } - yieldString(1) checkType { _() } + yieldString(1) checkType { _() } await { "123" } checkType { _() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.fir.kt index 270b165146e..8b6d3c16fc9 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.fir.kt @@ -22,5 +22,5 @@ interface TypePredicate : (KotlinType) -> Boolean { fun TypePredicate.expectedTypeFor(keys: Iterable): Map = keys.fold(SmartFMap.emptyMap()) { map, key -> - map.plus(key, this) + map.plus(key, this) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt index 8626a66681c..c692170151f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.fir.kt @@ -21,12 +21,12 @@ fun test( invOut.onlyOut(42) invOut.onlyOut(1L) - invOut.onlyOutUB("str") + invOut.onlyOutUB("str") invStar.onlyOutUB(0) invOut.onlyOutUB(42) invOut.onlyOutUB(1L) - invIn.onlyIn("str") + invIn.onlyIn("str") invIn.onlyIn(42) invIn.onlyIn(1L) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/suspendFunctions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/suspendFunctions.fir.kt index 3eac7717eb6..adfd486c01c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/suspendFunctions.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/suspendFunctions.fir.kt @@ -21,5 +21,5 @@ fun main() { // Here, the error should be val x2: (Int) -> Unit = takeSuspend(")!>id { it }, ")!>{ x -> x }) val x3: suspend (Int) -> Unit = takeSimpleFunction(")!>id { it }, ")!>{ x -> x }) - val x4: (Int) -> Unit = takeSimpleFunction(id Unit> {}, {}) + val x4: (Int) -> Unit = takeSimpleFunction(id Unit> {}, ")!>{}) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.fir.kt index 24f7c942f03..0a2061564ac 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.fir.kt @@ -10,7 +10,7 @@ fun T?.sure() : T = this!! fun List<*>.toArray(ar: Array): Array = ar fun testArrays(ci: List, cii: List?) { - val c1: Array = cii.sure().toArray(Array) + val c1: Array = cii.sure().toArray(Array) val c2: Array = ci.toArray(Array()) diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt index 3680f122cf3..73682ace08f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.fir.kt @@ -4,6 +4,6 @@ class Base : HashSet() { fun foo() { - super.remove("") + super.remove("") } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt index b8e71f703a8..7f312aad3d8 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt @@ -3,7 +3,7 @@ private const val dateRangeEnd: String = "2020-05-01" private fun String?.toIconList(): List = when (this) { null -> listOf("DATE_IS_NULL") - in dateRangeStart..dateRangeEnd -> emptyList() + in dateRangeStart..dateRangeEnd -> emptyList() else -> listOf("DATE_IS_OUT_OF_RANGE") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.fir.kt index 29af733c4e9..8bcc67304aa 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.fir.kt @@ -6,7 +6,7 @@ class O : Function2 { fun test() { val a = fun(o: O) { } - a {} + a {} } class Ext : String.() -> Unit { diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.fir.kt index e75585de35b..b93ac607a60 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.fir.kt @@ -1,7 +1,7 @@ @JvmName() fun foo() {} -@JvmName(42) +@JvmName(42) fun bar() {} @JvmName("a", "b") diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.fir.kt index fd5c1c83709..bbd01a4f89b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.fir.kt @@ -2,7 +2,7 @@ fun foo(c : Collection) = { c.filter{ val s : String? = bar() if (s == null) false // here! - zoo(s) + zoo(s) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/lambdaArgumentOfInapplicableCall.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/lambdaArgumentOfInapplicableCall.fir.kt index 77ad857b90f..1356e1e550e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/lambdaArgumentOfInapplicableCall.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/lambdaArgumentOfInapplicableCall.fir.kt @@ -1,6 +1,6 @@ // KT-45010 fun foo(map: MutableMap) { - map.getOrPut("Not an Int") { + map.getOrPut("Not an Int") { "Hello" + " world" } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.fir.kt index 9aef644def0..569fd007729 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.fir.kt @@ -3,7 +3,7 @@ fun indexOfMax(a: IntArray): Int? { var maxI: Int? = 0 a.forEachIndexed { i, value -> - if (value >= a[maxI]) { + if (value >= a[maxI]) { maxI = i } else if (value < 0) { diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt index b71491bbadc..2a8349677af 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.fir.kt @@ -46,7 +46,7 @@ fun foo(x: List, y: Throwable, z: A3) { y.fillInStackTrace() checkType { _() } - HashMap().getOrDefault(Any(), null) + HashMap().getOrDefault(Any(), null) // Falls back to extension in stdlib y.printStackTrace() diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.2.fir.kt index 258dc53741d..d80b765e275 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.2.fir.kt @@ -9,10 +9,10 @@ fun case_1() { 0b100_000_111_111L checkType { check() } 0b0L checkType { check() } - checkSubtype(0L) - checkSubtype(1000000L) - checkSubtype(0XAf10cDL) - checkSubtype(0x0_0L) - checkSubtype(0b100_000_111_111L) - checkSubtype(0b0L) + checkSubtype(0L) + checkSubtype(1000000L) + checkSubtype(0XAf10cDL) + checkSubtype(0x0_0L) + checkSubtype(0b100_000_111_111L) + checkSubtype(0b0L) } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.3.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.3.fir.kt index d699364d62f..3a32e14e067 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.3.fir.kt @@ -13,7 +13,7 @@ fun case_2() { 127 checkType { check() } 127 checkType { check() } - checkSubtype(128) + checkSubtype(128) 128 checkType { check() } 128 checkType { check() } 128 checkType { check() } @@ -22,7 +22,7 @@ fun case_2() { -128 checkType { check() } -128 checkType { check() } - checkSubtype(-129) + checkSubtype(-129) -129 checkType { check() } -129 checkType { check() } -129 checkType { check() } @@ -30,24 +30,24 @@ fun case_2() { // TESTCASE NUMBER: 3 fun case_3() { - checkSubtype(32767) + checkSubtype(32767) 32767 checkType { check() } 32767 checkType { check() } 32767 checkType { check() } - checkSubtype(32768) - checkSubtype(32768) + checkSubtype(32768) + checkSubtype(32768) 32768 checkType { check() } 32768 checkType { check() } 32768 checkType { check() } - checkSubtype(-32768) + checkSubtype(-32768) -32768 checkType { check() } -32768 checkType { check() } -32768 checkType { check() } - checkSubtype(-32769) - checkSubtype(-32769) + checkSubtype(-32769) + checkSubtype(-32769) -32769 checkType { check() } -32769 checkType { check() } -32769 checkType { check() } @@ -55,28 +55,28 @@ fun case_3() { // TESTCASE NUMBER: 4 fun case_4() { - checkSubtype(2147483647) - checkSubtype(2147483647) + checkSubtype(2147483647) + checkSubtype(2147483647) 2147483647 checkType { check() } 2147483647 checkType { check() } 2147483647 checkType { check() } - checkSubtype(2147483648) - checkSubtype(2147483648) - checkSubtype(2147483648) + checkSubtype(2147483648) + checkSubtype(2147483648) + checkSubtype(2147483648) 2147483648 checkType { check() } 2147483648 checkType { check() } 2147483648 checkType { check() } - checkSubtype(-2147483648) - checkSubtype(-2147483648) + checkSubtype(-2147483648) + checkSubtype(-2147483648) -2147483648 checkType { check() } -2147483648 checkType { check() } -2147483648 checkType { check() } - checkSubtype(-2147483649) - checkSubtype(-2147483649) - checkSubtype(-2147483649) + checkSubtype(-2147483649) + checkSubtype(-2147483649) + checkSubtype(-2147483649) -2147483649 checkType { check() } -2147483649 checkType { check() } -2147483649 checkType { check() } @@ -84,16 +84,16 @@ fun case_4() { // TESTCASE NUMBER: 5 fun case_5() { - checkSubtype(9223372036854775807) - checkSubtype(9223372036854775807) - checkSubtype(9223372036854775807) + checkSubtype(9223372036854775807) + checkSubtype(9223372036854775807) + checkSubtype(9223372036854775807) 9223372036854775807 checkType { check() } 9223372036854775807 checkType { check() } 9223372036854775807 checkType { check() } - checkSubtype(-9223372036854775807) - checkSubtype(-9223372036854775807) - checkSubtype(-9223372036854775807) + checkSubtype(-9223372036854775807) + checkSubtype(-9223372036854775807) + checkSubtype(-9223372036854775807) -9223372036854775807 checkType { check() } -9223372036854775807 checkType { check() } -9223372036854775807 checkType { check() } @@ -101,10 +101,10 @@ fun case_5() { // TESTCASE NUMBER: 6 fun case_6() { - checkSubtype(-100000000000000000000000000000000) - checkSubtype(-100000000000000000000000000000000) - checkSubtype(-100000000000000000000000000000000) - checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) -100000000000000000000000000000000 checkType { check() } -100000000000000000000000000000000 checkType { check() } -100000000000000000000000000000000 checkType { check() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.4.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.4.fir.kt index 562a11cf94e..800df3eba7c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.4.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.4.fir.kt @@ -2,24 +2,24 @@ // TESTCASE NUMBER: 1 fun case_1() { - checkSubtype(-9223372036854775808L) + checkSubtype(-9223372036854775808L) -9223372036854775808L checkType { check() } - checkSubtype(9223372036854775808L) + checkSubtype(9223372036854775808L) 9223372036854775808L checkType { check() } } // TESTCASE NUMBER: 2 fun case_2() { - checkSubtype(100000000000000000000000000000000L) + checkSubtype(100000000000000000000000000000000L) 100000000000000000000000000000000L checkType { check() } - checkSubtype(100000000000000000000000000000000l) + checkSubtype(100000000000000000000000000000000l) 100000000000000000000000000000000l checkType { check() } - checkSubtype(-100000000000000000000000000000000L) + checkSubtype(-100000000000000000000000000000000L) -100000000000000000000000000000000L checkType { check() } - checkSubtype(-100000000000000000000000000000000l) + checkSubtype(-100000000000000000000000000000000l) -100000000000000000000000000000000l checkType { check() } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.5.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.5.fir.kt index 35748287864..acc3c5b77fe 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.5.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.5.fir.kt @@ -19,34 +19,34 @@ import functions.* // TESTCASE NUMBER: 1 fun case_1() { - f1(128) - f1(-129) - f1(32767) - f1(-32768) - f1(2147483647) - f1(-2147483648) - f1(9223372036854775807) - f1(-9223372036854775807) + f1(128) + f1(-129) + f1(32767) + f1(-32768) + f1(2147483647) + f1(-2147483648) + f1(9223372036854775807) + f1(-9223372036854775807) f1(1000000000000000000000000000000000000000000000000) f1(-1000000000000000000000000000000000000000000000000) } // TESTCASE NUMBER: 2 fun case_2() { - f2(32768) - f2(-32769) - f2(2147483647) - f2(-2147483648) - f2(9223372036854775807) - f2(-9223372036854775807) + f2(32768) + f2(-32769) + f2(2147483647) + f2(-2147483648) + f2(9223372036854775807) + f2(-9223372036854775807) f2(1000000000000000000000000000000000000000000000000) f2(-1000000000000000000000000000000000000000000000000) } // TESTCASE NUMBER: 3 fun case_3() { - f3(9223372036854775807) - f3(-9223372036854775807) + f3(9223372036854775807) + f3(-9223372036854775807) f3(1000000000000000000000000000000000000000000000000) f3(-1000000000000000000000000000000000000000000000000) } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.fir.kt index c69828fe00a..66499e6797d 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.fir.kt @@ -237,9 +237,9 @@ fun case_3(value_1: Any?) { fun case_4(value_1: Any?) { case_4_1(value_1) value_1?.toByte() - case_4_2(value_1) + case_4_2(value_1) value_1.toByte() - case_4_3(value_1) + case_4_3(value_1) value_1.inv() } @@ -331,30 +331,30 @@ fun case_7(value_1: Any?) { fun case_8(value_1: Any?) { if (case_8_1(value_1)) { value_1?.toByte() - if (case_8_2(value_1)) { + if (case_8_2(value_1)) { value_1.toByte() - if (case_8_3(value_1)) value_1.inv() + if (case_8_3(value_1)) value_1.inv() } } if (!case_8_4(value_1)) { value_1?.toByte() - if (!case_8_5(value_1)) { + if (!case_8_5(value_1)) { value_1.toByte() - if (!case_8_6(value_1)) value_1.inv() + if (!case_8_6(value_1)) value_1.inv() } } if (case_8_7(value_1) == null) { value_1?.toByte() - if (case_8_8(value_1) != null) { + if (case_8_8(value_1) != null) { value_1.toByte() - if (case_8_9(value_1) != null) value_1.inv() + if (case_8_9(value_1) != null) value_1.inv() } } if (case_8_10(value_1) != null) { value_1?.toByte() - if (case_8_11(value_1) == null) { + if (case_8_11(value_1) == null) { value_1.toByte() - if (case_8_12(value_1) == null) value_1.inv() + if (case_8_12(value_1) == null) value_1.inv() } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/4.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/4.fir.kt index eaf488edb7e..55e406b51b6 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/4.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/4.fir.kt @@ -6,18 +6,18 @@ import kotlin.contracts.* // TESTCASE NUMBER: 1 fun case_1(): Boolean? { - contract { returnsNotNull() implies (null) } + contract { returnsNotNull() implies (null) } return true } // TESTCASE NUMBER: 2 fun case_2(): Boolean { - contract { returns(false) implies 0.000001 } + contract { returns(false) implies 0.000001 } return true } // TESTCASE NUMBER: 3 fun case_3(): Boolean? { - contract { returns(null) implies "" } + contract { returns(null) implies "" } return null } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/5.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/5.fir.kt index 4474d9ed507..10b33bf4e7c 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/5.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/common/neg/5.fir.kt @@ -6,7 +6,7 @@ import kotlin.contracts.* // TESTCASE NUMBER: 1 fun case_1(): Boolean { - contract { returns(true) implies (-10) } + contract { returns(true) implies (-10) } return true } @@ -18,7 +18,7 @@ fun case_2(): Boolean { // TESTCASE NUMBER: 3 fun case_3(): Boolean { - contract { returns(false) implies ("..." + "$value_1") } + contract { returns(false) implies ("..." + "$value_1") } return true } @@ -27,19 +27,19 @@ fun case_3(): Boolean { * ISSUES: KT-26386 */ fun case_4(): Boolean? { - contract { returns(null) implies case_4() } + contract { returns(null) implies case_4() } return null } // TESTCASE NUMBER: 5 fun case_5(): Boolean? { - contract { returns(null) implies listOf(0) } + contract { returns(null) implies listOf(0) } return null } // TESTCASE NUMBER: 6 fun case_6(value_1: Boolean): Boolean? { - contract { returns(null) implies contract { returns(null) implies (!value_1) } } + contract { returns(null) implies contract { returns(null) implies (!value_1) } } return null } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/15.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/15.fir.kt index 895bd4ef64d..fe612d46382 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/15.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/15.fir.kt @@ -96,7 +96,7 @@ fun case_7() { fun case_8(y: MutableList) { var x: Boolean? = true if (x != null) { - y[if (true) {x = null;0} else 0] = x + y[if (true) {x = null;0} else 0] = x } } @@ -130,6 +130,6 @@ fun case_10() { fun case_11(y: MutableList>) { var x: Int? = 10 if (x != null) { - y[if (true) {x = null;0} else 0][x] = 10 + y[if (true) {x = null;0} else 0][x] = 10 } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt index 18806d60f39..fd59f42ba7d 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt @@ -6,6 +6,6 @@ fun > Inv.case_1() { if (this is MutableList<*>) { & kotlin.collections.MutableList<*> & Inv")!>this - & kotlin.collections.MutableList<*> & Inv")!>this[0] = & kotlin.collections.MutableList<*> & Inv")!>this[1] + & kotlin.collections.MutableList<*> & Inv")!>this[0] = & kotlin.collections.MutableList<*> & Inv")!>this[1] } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.fir.kt index 68b7a915f63..4c60decae17 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/32.fir.kt @@ -12,7 +12,7 @@ fun stringArg(number: String) {} */ fun case_1(x: Int?) { if (x == null) { - stringArg(x!!) + stringArg(x!!) x } } @@ -24,7 +24,7 @@ fun case_1(x: Int?) { */ fun case_2(x: Int?, y: Nothing?) { if (x == y) { - stringArg(x!!) + stringArg(x!!) x } } @@ -37,7 +37,7 @@ fun case_2(x: Int?, y: Nothing?) { fun case_3(x: Int?) { if (x == null) { x as Int - stringArg(x) + stringArg(x) x } } @@ -50,7 +50,7 @@ fun case_3(x: Int?) { fun case_4(x: Int?) { if (x == null) { x!! - stringArg(x) + stringArg(x) x } } @@ -64,7 +64,7 @@ fun case_5(x: Int?) { if (x == null) { var y = x y!! - stringArg(y) + stringArg(y) y } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/33.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/33.fir.kt index 09f7ad29aa3..0cb3d4cbb07 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/33.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/33.fir.kt @@ -12,7 +12,7 @@ fun nullableStringArg(number: String?) {} */ fun case_1(x: Int?) { if (x == null) { - nullableStringArg(x) + nullableStringArg(x) } } @@ -23,7 +23,7 @@ fun case_1(x: Int?) { */ fun case_2(x: Int?, y: Nothing?) { if (x == y) { - nullableStringArg(x) + nullableStringArg(x) } } @@ -34,7 +34,7 @@ fun case_2(x: Int?, y: Nothing?) { */ fun case_3(x: Int?) { if (x == null) { - nullableStringArg(x) + nullableStringArg(x) } } @@ -45,7 +45,7 @@ fun case_3(x: Int?) { */ fun case_4(x: Int?) { if (x == null) { - nullableStringArg(x) + nullableStringArg(x) } } @@ -57,6 +57,6 @@ fun case_4(x: Int?) { fun case_5(x: Int?) { if (x == null) { var y = x - nullableStringArg(y) + nullableStringArg(y) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/52.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/52.fir.kt index 763e156a4b6..caa259385cb 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/52.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/52.fir.kt @@ -29,7 +29,7 @@ fun case_3(x: String?) = x fun case_3() { var x: Int? = 10 x = null - case_3(x) + case_3(x) } /* diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/58.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/58.fir.kt index 224d362be6e..fa31392cd1f 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/58.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/58.fir.kt @@ -74,7 +74,7 @@ fun case_6() { var y: Inv = Inv() if (true) y = x - y.put(0) + y.put(0) val z: Inv = x z.put(0) } diff --git a/idea/testData/checker/AnnotationSupressing.fir.kt b/idea/testData/checker/AnnotationSupressing.fir.kt index 46037a0394f..077bc499ca9 100644 --- a/idea/testData/checker/AnnotationSupressing.fir.kt +++ b/idea/testData/checker/AnnotationSupressing.fir.kt @@ -1,32 +1,32 @@ annotation class A(val i: Int) annotation class Z(val i: Int) -@Z("BAD") @Suppress("TYPE_MISMATCH") +@Z("BAD") @Suppress("TYPE_MISMATCH") fun some0() {} -@Z("BAD") @Z("BAD") @Suppress("TYPE_MISMATCH") +@Z("BAD") @Z("BAD") @Suppress("TYPE_MISMATCH") fun some01() {} -@Suppress("TYPE_MISMATCH") @Z("BAD") +@Suppress("TYPE_MISMATCH") @Z("BAD") fun some1() { } -@Suppress("TYPE_MISMATCH") @Z("BAD") @Z("BAD") +@Suppress("TYPE_MISMATCH") @Z("BAD") @Z("BAD") fun some11() { } -@A("BAD") @Suppress("TYPE_MISMATCH") +@A("BAD") @Suppress("TYPE_MISMATCH") fun some2() { } -@Suppress("TYPE_MISMATCH") @A("BAD") +@Suppress("TYPE_MISMATCH") @A("BAD") fun some3() { } -@A("BAD") @A("BAD") +@A("BAD") @A("BAD") fun some4() { } -@Z("BAD") +@Z("BAD") fun someN() { } diff --git a/idea/testData/checker/Constants.fir.kt b/idea/testData/checker/Constants.fir.kt deleted file mode 100644 index c7b35013476..00000000000 --- a/idea/testData/checker/Constants.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -fun checkSubtype(t: T) = t - -fun test() { - checkSubtype(1) - checkSubtype(1) - checkSubtype(1) - 1 as Byte - 1 as Int - 1 as Double -} diff --git a/idea/testData/checker/Constants.kt b/idea/testData/checker/Constants.kt index 312c194d9f7..da2cd3f8c06 100644 --- a/idea/testData/checker/Constants.kt +++ b/idea/testData/checker/Constants.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun checkSubtype(t: T) = t fun test() { diff --git a/idea/testData/checker/MultipleBounds.fir.kt b/idea/testData/checker/MultipleBounds.fir.kt index a66fb827ef7..cfca76480f3 100644 --- a/idea/testData/checker/MultipleBounds.fir.kt +++ b/idea/testData/checker/MultipleBounds.fir.kt @@ -56,8 +56,8 @@ fun test2(t : T) t.bar() } -val t1 = test2(A()) -val t2 = test2(C()) +val t1 = test2(A()) +val t2 = test2(C()) val t3 = test2(C()) val Pair.x : Int get() = 0 diff --git a/idea/testData/checker/NullAsAnnotationArgument.fir.kt b/idea/testData/checker/NullAsAnnotationArgument.fir.kt index 167b03e5522..d9b53396379 100644 --- a/idea/testData/checker/NullAsAnnotationArgument.fir.kt +++ b/idea/testData/checker/NullAsAnnotationArgument.fir.kt @@ -3,8 +3,8 @@ package test annotation class A(val value: String) -@A(null) +@A(null) fun foo() {} -@A(null) +@A(null) class B diff --git a/idea/testData/checker/ResolveToJava.fir.kt b/idea/testData/checker/ResolveToJava.fir.kt index 5252d6efc96..36601dd3f2f 100644 --- a/idea/testData/checker/ResolveToJava.fir.kt +++ b/idea/testData/checker/ResolveToJava.fir.kt @@ -24,7 +24,7 @@ fun test(l : List) { Collections.emptyList() checkSubtype?>(Collections.singleton(1)) - Collections.singleton(1.0) + Collections.singleton(1.0) List diff --git a/idea/testData/checker/Variance.fir.kt b/idea/testData/checker/Variance.fir.kt index f198effe496..bae418ec31d 100644 --- a/idea/testData/checker/Variance.fir.kt +++ b/idea/testData/checker/Variance.fir.kt @@ -32,9 +32,9 @@ fun copy3(from : Array, to : Array) {} fun copy4(from : Array, to : Array) {} fun f(ints: Array, any: Array, numbers: Array) { - copy1(ints, any) + copy1(ints, any) copy2(ints, any) //ok - copy2(ints, numbers) + copy2(ints, numbers) copy3(ints, numbers) copy4(ints, numbers) //ok } diff --git a/idea/testData/checker/diagnosticsMessage/noSubstitutedTypeParameter.fir.kt b/idea/testData/checker/diagnosticsMessage/noSubstitutedTypeParameter.fir.kt index c0b3c5b9176..7c0533bf03a 100644 --- a/idea/testData/checker/diagnosticsMessage/noSubstitutedTypeParameter.fir.kt +++ b/idea/testData/checker/diagnosticsMessage/noSubstitutedTypeParameter.fir.kt @@ -1,6 +1,6 @@ // COMPILER_ARGUMENTS: -XXLanguage:-NewInference -val f = listOf("").firstOrNull(1) +val f = listOf("").firstOrNull(1) fun listOf(element: T): List = java.util.Collections.singletonList(element) -fun Iterable.firstOrNull(predicate: (T) -> Boolean): T? = null +fun Iterable.firstOrNull(predicate: (T) -> Boolean): T? = null \ No newline at end of file diff --git a/idea/testData/checker/infos/SmartCasts.fir.kt b/idea/testData/checker/infos/SmartCasts.fir.kt index 91c16c332fe..e7875925b4d 100644 --- a/idea/testData/checker/infos/SmartCasts.fir.kt +++ b/idea/testData/checker/infos/SmartCasts.fir.kt @@ -196,11 +196,11 @@ fun returnFunctionLiteral(a: Any?): Function0 = fun mergeSmartCasts(a: Any?) { if (a is String || a is Int) { - a.compareTo("") + a.compareTo("") a.toString() } if (a is Int || a is String) { - a.compareTo("") + a.compareTo("") } when (a) { is String, is Any -> a.compareTo("") diff --git a/idea/testData/checker/regression/CoercionToUnit.fir.kt b/idea/testData/checker/regression/CoercionToUnit.fir.kt index af845e1537a..89c3aca5c0d 100644 --- a/idea/testData/checker/regression/CoercionToUnit.fir.kt +++ b/idea/testData/checker/regression/CoercionToUnit.fir.kt @@ -1,9 +1,9 @@ fun foo(u : Unit) : Int = 1 fun test() : Int { - foo(1) + foo(1) val a : () -> Unit = { - foo(1) + foo(1) } return 1 } diff --git a/idea/testData/checker/regression/DoubleDefine.fir.kt b/idea/testData/checker/regression/DoubleDefine.fir.kt index 96b2383e0b6..f2e676d00a1 100644 --- a/idea/testData/checker/regression/DoubleDefine.fir.kt +++ b/idea/testData/checker/regression/DoubleDefine.fir.kt @@ -11,7 +11,7 @@ fun takeFirst(expr: StringBuilder): Char { fun evaluateArg(expr: CharSequence, numbers: ArrayList): Int { if (expr.length == 0) throw Exception("Syntax error: Character expected"); - val c = takeFirst(expr) + val c = takeFirst(expr) if (c >= '0' && c <= '9') { val n = c - '0' if (!numbers.contains(n)) throw Exception("You used incorrect number: " + n)