diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt index 3eb557c7464..311031f5c2e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt @@ -10,8 +10,8 @@ FILE: lambdaInUnresolvedCall.kt ) } public final fun test_2(): R|kotlin/Unit| { - #( = myRun@fun (): R|kotlin/Any?| { - ^ R|/materialize|() + #( = myRun@fun (): { + ^ R|/materialize|() } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.fir.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.fir.txt index e01b2a193b4..036ca920f8c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.fir.txt @@ -148,13 +148,13 @@ FILE: conflictingProjection.kt ^test15 R|/InOuter.InOuter|().R|SubstitutionOverride|().R|SubstitutionOverride|() } public final fun test16(): R|InOuter.OutIntermediate.InInner| { - ^test16 R|/InOuter.InOuter|().R|SubstitutionOverride|().R|SubstitutionOverride|() + ^test16 R|/InOuter.InOuter|().R|SubstitutionOverride|().#() } public final fun test17(): R|InOuter.OutIntermediate.InInner| { ^test17 R|/InOuter.InOuter|().R|SubstitutionOverride|().R|SubstitutionOverride|() } public final fun test18(): R|InOuter.OutIntermediate.InInner| { - ^test18 R|/InOuter.InOuter|().R|SubstitutionOverride|().R|SubstitutionOverride|() + ^test18 R|/InOuter.InOuter|().R|SubstitutionOverride|().#() } public final class TwoParametersOuter : R|kotlin/Any| { public constructor(): R|TwoParametersOuter| { diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt index 7420d066b10..fbcd8e944fc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingProjection.kt @@ -89,10 +89,10 @@ fun test13(): InOuter.OutIntermediate<in Strin fun test14(): InOuter.OutIntermediate<out String>.InInner = InOuter().OutIntermediate().InInner() fun test15(): InOuter.OutIntermediate.InInner<in Char> = InOuter().OutIntermediate().InInner() -fun test16(): InOuter.OutIntermediate.InInner<out Char> = InOuter().OutIntermediate().InInner() +fun test16(): InOuter.OutIntermediate.InInner<out Char> = InOuter().OutIntermediate().InInner() fun test17(): InOuter<in Int>.OutIntermediate<out String>.InInner = InOuter().OutIntermediate().InInner() -fun test18(): InOuter.OutIntermediate<in String>.InInner<out Char> = InOuter().OutIntermediate().InInner() +fun test18(): InOuter.OutIntermediate<in String>.InInner<out Char> = InOuter().OutIntermediate().InInner() class TwoParametersOuter { inner class TwoParametersIntermediate { 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 42852b2085a..57618327c93 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.fir.txt @@ -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/expresssions/inference/typeParameters.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/inference/typeParameters.fir.txt index 31a39eb0025..26f274150ad 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|Foo| = #(R|/bar|) + lval b: = #(R|/bar|) } 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 5a018e60276..3be1d1c96d7 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/samConstructors/genericSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt index bad91b82b2e..92e1c24140f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt @@ -8,7 +8,7 @@ FILE: main.kt ^ R|/x|.R|kotlin/Any.toString|() } ) - R|/MyFunction|( = MyFunction@fun (x: R|ft|): R|kotlin/Any?| { + #( = MyFunction@fun (x: ): { ^ String() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.kt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.kt index e8bd5587cd3..cdc940863e1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.kt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.kt @@ -14,7 +14,7 @@ fun main() { x.toString() } - MyFunction { x -> + MyFunction { x -> "" } } diff --git a/compiler/fir/analysis-tests/testData/resolve/tryInference.fir.txt b/compiler/fir/analysis-tests/testData/resolve/tryInference.fir.txt index 338078f423a..11c04707bd0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/tryInference.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/tryInference.fir.txt @@ -14,7 +14,7 @@ FILE: tryInference.kt R|/materialize|() } finally { - R|/materialize|() + #() } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/tryInference.kt b/compiler/fir/analysis-tests/testData/resolve/tryInference.kt index 4ee09058718..2114c6f5ed1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/tryInference.kt +++ b/compiler/fir/analysis-tests/testData/resolve/tryInference.kt @@ -11,7 +11,7 @@ fun test() { } catch (e: Exception) { materialize() } finally { - materialize() // Should be an errror + materialize() // Should be an errror } ) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.txt index 4f867ede5e3..5f1498563fa 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.txt @@ -6,5 +6,5 @@ FILE: ambiguityWhenNoApplicableCallableReferenceCandidate.kt public final fun bar(f: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { - R|/bar|(::#) + #(::#) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.kt index 0808239c646..42afd22146c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/ambiguityWhenNoApplicableCallableReferenceCandidate.kt @@ -4,5 +4,5 @@ fun foo(y: String) {} fun bar(f: (T) -> Unit) {} fun test() { - bar(::foo) + bar(::foo) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt index 45c24a82608..4b81d5c31ef 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt @@ -30,14 +30,14 @@ FILE: chooseCallableReferenceDependingOnInferredReceiver.kt ^bar R|kotlin/TODO|() } public final fun test(): R|kotlin/Unit| { - R|/myWith|(R|/A.A|(), = myWith@fun R|A|.(): R|kotlin/Nothing| { + #(R|/A.A|(), = myWith@fun R|A|.(): { lval t1: R|A| = R|/bar|(::R|/A.foo|) lval t2: R|A| = R|/bar|(::R|/A.baz|) - ^ R|/myWith|(R|/B.B|(), = myWith@fun R|B|.(): R|kotlin/Nothing| { + ^ R|/myWith|(R|/B.B|(), = myWith@fun R|B|.(): { lval a: R|A| = R|/bar|(::R|/A.foo|) lval b: R|B| = R|/bar|(::R|/B.foo|) lval t3: R|B| = R|/bar|(::R|/B.baz|) - ^ R|/bar|(::#) + ^ R|/bar|(::#) } ) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt index d1696c178a3..067519af20e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt @@ -14,7 +14,7 @@ class B { fun bar(f: (T) -> Unit): T = TODO() fun test() { - myWith(A()) { + myWith(A()) { val t1 = bar(::foo) val t2 = bar(::baz) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.fir.txt index 33bbc9f2684..49a6eeb8630 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.fir.txt @@ -21,5 +21,5 @@ FILE: eagerAndPostponedCallableReferences.kt lval a4: R|B| = R|/foo|(::R|/multiple|, ::R|/singleB|) lval a5: R|A| = R|/foo|(::R|/singleA|, ::R|/singleA|) lval a6: R|it(A & B)| = R|/foo|(::R|/singleA|, ::R|/singleB|) - R|/foo|(::#, ::#) + #(::#, ::#) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.kt index 70a8d59dc6d..8b73f9a326e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/eagerAndPostponedCallableReferences.kt @@ -22,5 +22,5 @@ fun test() { val a6 = foo(::singleA, ::singleB) - foo(::multiple, ::multiple) + foo(::multiple, ::multiple) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/implicitTypes.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/implicitTypes.fir.txt index a4aada100e8..bf34bc65cf5 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/implicitTypes.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/implicitTypes.fir.txt @@ -8,8 +8,8 @@ FILE: implicitTypes.kt public final fun bar(x: R|kotlin/String|): R|kotlin/Int| { ^bar Int(1) } - public final fun loop1(): R|(kotlin/Any?) -> kotlin/Nothing| { - ^loop1 #(::#) + public final fun loop1(): R|(ERROR CLASS: Cannot infer argument for type parameter T) -> ERROR CLASS: Cannot infer argument for type parameter R| { + ^loop1 #(::#) } public final fun loop2(): { ^loop2 R|/loop1|() diff --git a/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt b/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt index 9c4a71a3c1a..cdcb8f3dce9 100644 --- a/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt +++ b/compiler/testData/diagnostics/tests/EnumEntryAsType.fir.kt @@ -47,7 +47,7 @@ fun bar(a: Any): T = a as T fun foo() { foo<Color.RED>() - foo() + foo<RedAlias>() bar<Color.RED>(Color.RED) } diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt index f6a8f07798a..c138a76b569 100644 --- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt @@ -48,7 +48,7 @@ fun main(args : Array) { val b = fooT2()(1) checkSubtype(b) - fooT2()(1) // : Any? + fooT2()(1) // : Any? 1() 1{} diff --git a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.fir.kt b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.fir.kt index 77e680a4f11..e7a4bbd2c5f 100644 --- a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.fir.kt +++ b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.fir.kt @@ -4,7 +4,7 @@ fun test(a : java.lang.annotation.RetentionPolicy) { } fun test() { - java.util.Collections.emptyList() + java.util.Collections.emptyList() val a : Collection? = java.util.Collections.emptyList() } diff --git a/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt b/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt index 784c31056d5..8abcb8f5f97 100644 --- a/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt +++ b/compiler/testData/diagnostics/tests/ResolveToJava.fir.kt @@ -24,7 +24,7 @@ fun test(l : java.util.List) { Collections.emptyList Collections.emptyList Collections.emptyList() - Collections.emptyList() + Collections.emptyList() checkSubtype?>(Collections.singleton(1)) Collections.singleton(1.0) diff --git a/compiler/testData/diagnostics/tests/TypeInference.fir.kt b/compiler/testData/diagnostics/tests/TypeInference.fir.kt index 8348f80e5c5..5e7238e0988 100644 --- a/compiler/testData/diagnostics/tests/TypeInference.fir.kt +++ b/compiler/testData/diagnostics/tests/TypeInference.fir.kt @@ -9,10 +9,10 @@ fun main() { val a : C = C(); val x : C = C() val y : C = C() - val z : C<*> = C() + val z : C<*> = C() val ba : C = bar(); val bx : C = bar() val by : C = bar() - val bz : C<*> = bar() + val bz : C<*> = bar() } diff --git a/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt b/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt index 13a76aab14a..1832a82cbb4 100644 --- a/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE fun main() { - val x = run { ::run } // no error + val x = run { ::run } // no error } diff --git a/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.fir.kt b/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.fir.kt index 2fbfaa4c63b..d619986d107 100644 --- a/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/kt34314_lambda.fir.kt @@ -3,5 +3,5 @@ fun materialize(): T = TODO() fun main() { - val x = run { materialize() } + val x = run { materialize() } } diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.kt index 8cc923c4142..7e97f5c163e 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWhenNoApplicableCallableReferenceCandidate.fir.kt @@ -7,5 +7,5 @@ fun foo(y: String) {} fun bar(f: (T) -> Unit) {} fun test() { - bar(::foo) + bar(::foo) } diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWithBoundExtensionReceiver.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWithBoundExtensionReceiver.fir.kt index df45601bc63..7c4f4c9a778 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWithBoundExtensionReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/ambiguityWithBoundExtensionReceiver.fir.kt @@ -10,6 +10,6 @@ fun A.foo() = "" class A { fun main() { - bar(::foo) checkType { _() } + bar(::foo) checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt index 0d4f9eb6956..1dfdb2ee6e2 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt @@ -17,7 +17,7 @@ class B { fun bar(f: (T) -> Unit): T = TODO() fun test() { - myWith(A()) { + myWith(A()) { val t1 = bar(::foo) t1 diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/eagerAndPostponedCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/eagerAndPostponedCallableReferences.fir.kt index acea7de6160..c71f31484df 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/eagerAndPostponedCallableReferences.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/eagerAndPostponedCallableReferences.fir.kt @@ -31,5 +31,5 @@ fun test() { val a6 = foo(::singleA, ::singleB) a6 - foo(::multiple, ::multiple) + foo(::multiple, ::multiple) } diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.fir.kt new file mode 100644 index 00000000000..92c5803826d --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.fir.kt @@ -0,0 +1,11 @@ +// !LANGUAGE: +NewInference + +interface Base + +fun materialize(): K = TODO() + +fun Base.transform(): T = materialize() + +fun test(child: Base) { + child == child.transform() +} diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt index 458dbf5d3a8..c479d68d729 100644 --- a/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt +++ b/compiler/testData/diagnostics/tests/callableReference/resolve/resolveEqualsOperatorWithAnyExpectedType.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // !LANGUAGE: +NewInference interface Base @@ -9,4 +8,4 @@ fun Base.transform(): T = materialize() fun test(child: Base) { child == child.transform() -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/callableReference/unsupported/localVariableWithSubstitution.fir.kt b/compiler/testData/diagnostics/tests/callableReference/unsupported/localVariableWithSubstitution.fir.kt index 19ec064942a..00bb2ef13b4 100644 --- a/compiler/testData/diagnostics/tests/callableReference/unsupported/localVariableWithSubstitution.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/unsupported/localVariableWithSubstitution.fir.kt @@ -9,6 +9,6 @@ class Foo { fun main() { val f = Foo() val a: Int - get() = f.getValue(null, ::a) // no exception after fix + get() = f.getValue(null, ::a) // no exception after fix print(a) } diff --git a/compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.fir.kt b/compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.fir.kt index 1b8fc15d6ba..7ef33a78ec2 100644 --- a/compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.fir.kt +++ b/compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.fir.kt @@ -9,6 +9,6 @@ class Foo { fun main(x: Int) { val f = Foo() val a: Int - get() = f.getValue(null, ::x) // no exception after fix + get() = f.getValue(null, ::x) // no exception after fix print(a) } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.fir.kt index df19536f6bc..67745821ca2 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.fir.kt @@ -4,7 +4,7 @@ fun foo(block: () -> (() -> Int)) {} fun test() { val x = fun named1(x: Int): Int { return 1 } - x checkType { _>() } + x checkType { _>() } foo { fun named2(): Int {return 1} } foo({ fun named3() = 1 }) diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.fir.kt index 8dc14e0c5b0..1e9ff79986a 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.fir.kt @@ -9,10 +9,10 @@ class A(outer: Outer) { var g: String by outer.getContainer().getMyProperty() - var b: String by foo(getMyProperty()) - var r: String by foo(outer.getContainer().getMyProperty()) - var e: String by + foo(getMyProperty()) - var f: String by foo(getMyProperty()) - 1 + var b: String by foo(getMyProperty()) + var r: String by foo(outer.getContainer().getMyProperty()) + var e: String by + foo(getMyProperty()) + var f: String by foo(getMyProperty()) - 1 } fun foo(a: Any?) = MyProperty() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.fir.kt index cf7453650ad..10fdfcfffcb 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.fir.kt @@ -7,7 +7,7 @@ class A() { operator fun setValue(t: Any?, p: KProperty<*>, x: T) = Unit } -var a1: Int by A() +var a1: Int by A() var a2: Int by A() class B() { @@ -16,7 +16,7 @@ class B() { } var b1: Int by B() -var b2: Int by B() +var b2: Int by B() class C() { operator fun getValue(t: Any?, p: KProperty<*>): R = null!! @@ -24,4 +24,4 @@ class C() { } var c1: Int by C() -var c2: Int by C() +var c2: Int by C() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.fir.kt index bf6a346d35a..803c472b82a 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.fir.kt @@ -3,7 +3,7 @@ import kotlin.reflect.KProperty var a: Int by A() -var a1 by A() +var a1 by A() var b: Int by B() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.fir.kt index a9081d1a357..22e4ad68cdc 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.fir.kt @@ -3,8 +3,8 @@ package foo import kotlin.reflect.KProperty class A { - var a5: String by MyProperty1() - var b5: String by getMyProperty1() + var a5: String by MyProperty1() + var b5: String by getMyProperty1() } fun getMyProperty1() = MyProperty1() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.fir.kt index d22a9c3184c..2329d6c5120 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.fir.kt @@ -2,7 +2,7 @@ import kotlin.reflect.KProperty class A { - var a by MyProperty() + var a by MyProperty() } class MyProperty { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt index 6c3179ee4d1..44559aa738f 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt @@ -52,12 +52,12 @@ class MyProperty2 { //-------------------------- class A3 { - var a3: String by MyProperty3() - var b3: String by getMyProperty3() + var a3: String by MyProperty3() + var b3: String by getMyProperty3() } -var c3: String by getMyProperty3() -var d3: String by MyProperty3() +var c3: String by getMyProperty3() +var d3: String by MyProperty3() fun getMyProperty3() = MyProperty3() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt b/compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt index 5708e28d291..e461e495cc2 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt @@ -5,7 +5,7 @@ class A { val p1 by this get - var p2 by this + var p2 by this get() = "" operator fun getValue(a: Any?, p: Any?) = "" diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt index 4e31f63ea74..44991d8b81f 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt @@ -4,7 +4,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/hostAndReceiver2.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt index 4532b1564ec..1d971cfa808 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt @@ -8,6 +8,6 @@ object T2 { operator fun Foo.provideDelegate(host: T2, p: Any?): Foo = TODO() operator fun Foo.getValue(receiver: String, p: Any?): T = TODO() - val String.test1: String by delegate() - val test2: String by delegate() + val String.test1: String by delegate() + val test2: String by delegate() } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.fir.kt index 6dadf66c16c..8675a610495 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.fir.kt @@ -8,5 +8,5 @@ object T3 { operator fun Foo.provideDelegate(host: T3, p: Any?): Foo = TODO() operator fun Foo.getValue(receiver: T3, p: Any?): T = TODO() - val test1: String by delegate() + val test1: String by delegate() } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.fir.kt index 2dc1c992fea..59f2a8d6124 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.fir.kt @@ -8,6 +8,6 @@ object Inference2 { operator fun Foo.provideDelegate(host: T, p: Any?): Foo = TODO() operator fun Foo.getValue(receiver: Inference2, p: Any?): String = TODO() - val test1: String by delegate() // same story like in Inference1 + val test1: String by delegate() // same story like in Inference1 val test2: String by delegate() } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt index f609c7e7986..ca5404dab5a 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt @@ -4,7 +4,7 @@ import kotlin.reflect.KProperty abstract class MainActivity : DIAware1() { - val bar: Bar by instance1() + val bar: Bar by instance1() } class Bar diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.fir.kt index b4c5584cbb1..d896f77a2d4 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.fir.kt @@ -12,5 +12,5 @@ fun String.provideDelegate(a: Any?, p: KProperty<*>) = StringDelegate(this) operator fun String.getValue(a: Any?, p: KProperty<*>) = this val test1: String by "OK" -val test2: Int by "OK" +val test2: Int by "OK" val test3 by "OK" diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.fir.kt deleted file mode 100644 index 3470a652725..00000000000 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.fir.kt +++ /dev/null @@ -1,9 +0,0 @@ -val test: String by materializeDelegate() - -fun materializeDelegate(): Delegate = Delegate() - -operator fun K.provideDelegate(receiver: Any?, property: kotlin.reflect.KProperty<*>): K = this - -class Delegate { - operator fun getValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>): V = TODO() -} diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.kt index 255377a047b..c8a373b85d7 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateResolutionWithStubTypes.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL val test: String by materializeDelegate() fun materializeDelegate(): Delegate = Delegate() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt index a18129f93a8..7557e21812e 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.fir.kt @@ -9,6 +9,6 @@ operator fun String.provideDelegate(thisRef: Any?, prop: Any) = WrongDelegate(th operator fun String.getValue(thisRef: Any?, prop: Any) = this -val test1: String by "OK" +val test1: String by "OK" val test2: Int by "OK" val test3 by "OK" diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt b/compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt index 3d020f1c116..f99b4b7d247 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt @@ -4,10 +4,10 @@ import kotlin.reflect.KProperty class D { - var c: Int by Delegate() + var c: Int by Delegate() } -var cTopLevel: Int by Delegate() +var cTopLevel: Int by Delegate() class A diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt b/compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt index 9c94281bc76..3c7b8fe56af 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt @@ -6,7 +6,7 @@ import kotlin.reflect.KProperty open class Base class Derived: Base() -var a: Derived by A() +var a: Derived by A() class A { operator fun getValue(t: Any?, p: KProperty<*>): Derived { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.fir.kt index 9f87631f031..5f3e9b7a50d 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.fir.kt @@ -2,7 +2,7 @@ import kotlin.reflect.KProperty -val c: Int by Delegate() +val c: Int by Delegate() class Delegate { operator fun getValue(t: Any?, p: KProperty<*>): String { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt index edcd12c677e..7c665c3f8b5 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.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 { operator fun getValue(t: Any?, p: KProperty<*>): Int { diff --git a/compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.fir.kt b/compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.fir.kt index 558f6dc9a95..d40e3109d56 100644 --- a/compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.fir.kt @@ -14,4 +14,4 @@ class Test1 : DeprecatedClassAlias() class Test2 : WithDeprecatedCtorAlias() -val test3 = ArrayListOfDeprecatedClass() \ No newline at end of file +val test3 = ArrayListOfDeprecatedClass() diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.fir.kt b/compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.fir.kt index f1b39d26f78..b26e8810996 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.fir.kt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.fir.kt @@ -5,5 +5,5 @@ fun foo() { fun A.foo() {} (fun A.foo() {}) - run(fun foo() {}) + run(fun foo() {}) } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.fir.kt index 54de7540b24..8d9bb8c8ba9 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.fir.kt @@ -29,10 +29,10 @@ fun bar(aInstance: A, bInstance: B) { d checkType { _() } } - foo(bInstance) { - (a, b), (c, d) -> - a checkType { _() } - b checkType { _() } + foo(bInstance) { + (a, b), (c, d) -> + a checkType { _() } + b checkType { _() } c checkType { _() } d checkType { _() } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.fir.kt index 15dfefa3581..d0e82d8e420 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.fir.kt @@ -20,7 +20,7 @@ class A : Outer() { fun foo() { Derived().foo() checkType { _.Inner>() } - Derived().baz() checkType { _>() } + Derived().baz() checkType { _>() } A.B().bar() checkType { _.Inner>() } - A.B().x() checkType { _>() } + A.B().x() checkType { _>() } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.fir.kt index 146f78ef334..2d888eed1df 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.fir.kt @@ -42,7 +42,7 @@ fun test() { x = foobar() x().foo().a() checkType { _>() } - x().bar() checkType { _>() } + x().bar() checkType { _>() } x = foobar() @@ -50,5 +50,5 @@ fun test() { y = noParameters() y().foo().a() checkType { _>() } - y().bar() checkType { _>() } + y().bar() checkType { _>() } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.fir.kt index 202dc6a5f67..1fd2fc780fd 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.fir.kt @@ -43,7 +43,7 @@ class Outer { x = foobar() x().foo().a() checkType { _>() } - x().bar() checkType { _>() } + x().bar() checkType { _>() } x = foobar() x = z.foobar() @@ -52,7 +52,7 @@ class Outer { y = noParameters() y().foo().a() checkType { _>() } - y().bar() checkType { _>() } + y().bar() checkType { _>() } } } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.fir.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.fir.kt index ccefd06ca5b..fbde26a0a7c 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.fir.kt @@ -15,5 +15,5 @@ class Derived : BaseDerived2() { fun foo() { Derived().foo() checkType { _.Inner>() } - Derived().baz() checkType { _>() } + Derived().baz() checkType { _>() } } diff --git a/compiler/testData/diagnostics/tests/generics/kt30590.fir.kt b/compiler/testData/diagnostics/tests/generics/kt30590.fir.kt index eb5d2cd96e3..5ef49ea4818 100644 --- a/compiler/testData/diagnostics/tests/generics/kt30590.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/kt30590.fir.kt @@ -5,4 +5,4 @@ interface A fun emptyStrangeMap(): Map = TODO() fun test7() : Map = emptyStrangeMap() -fun test() = emptyStrangeMap() +fun test() = emptyStrangeMap() diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.fir.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.fir.kt index c91803b2995..f3e15d9fd8e 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.fir.kt @@ -3,7 +3,7 @@ class C<reified T> fun id(p: T): T = p fun main() { - C() + C() val a: C = C() C() diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.fir.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.fir.kt index b73c9bec5a2..04e5a2598a4 100644 --- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.fir.kt @@ -9,7 +9,7 @@ inline fun f(): T = throw UnsupportedOperationException() fun id(p: T): T = p fun main() { - f() + f() val a: A = f() f() diff --git a/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.fir.kt b/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.fir.kt index 885e77f46f2..e495e235d2a 100644 --- a/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.fir.kt @@ -9,7 +9,7 @@ fun test1() { } fun test2() { - val m0 = java.util.HashMap() - val m1 = java.util.HashMap() - val m2 = java.util.HashMap() + val m0 = java.util.HashMap() + val m1 = java.util.HashMap<String, String, String>() + val m2 = java.util.HashMap<String>() } diff --git a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.fir.kt b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.fir.kt index a0b300bed43..aebf4a51dbc 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.fir.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.fir.kt @@ -5,5 +5,5 @@ fun foo(map: Map) : R = throw Exception() fun getMap() : Map = throw Exception() fun bar123() { - foo(getMap( + foo(getMap( } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt index 8b52ab11722..f1298dc4444 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt @@ -14,7 +14,7 @@ interface TestInterface { } fun test() { - val ret = combined({ }) { - emit(1) + val ret = combined({ }) { + emit(1) } } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt index d6d8858ed8f..1eccb4ce35c 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt @@ -80,7 +80,7 @@ fun poll05(): Flow { fun poll06(): Flow { return flow { - val inv = select(foo7(), ::Foo7) + val inv = select(foo7(), ::Foo7) inv } } @@ -479,21 +479,21 @@ fun poll85(): Flow { fun poll86(): Flow { return flow { - val inv = ::Foo7 in setOf(::Foo7) + val inv = ::Foo7 in setOf(::Foo7) inv } } fun poll87(): Flow { return flow { - val inv = ::Foo7 in setOf(foo7()) + val inv = ::Foo7 in setOf(foo7()) inv } } fun poll88(): Flow { return flow { - val inv = foo7() in setOf(::Foo7) + val inv = foo7() in setOf(::Foo7) inv } } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt index 7b62420519a..d1c86237184 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt @@ -81,7 +81,7 @@ fun poll05(): Flow { fun poll06(): Flow { return flow { - val inv = select(foo7(), ::Foo7) + val inv = select(foo7(), ::Foo7) inv } } @@ -480,21 +480,21 @@ fun poll85(): Flow { fun poll86(): Flow { return flow { - val inv = ::Foo7 in setOf(::Foo7) + val inv = ::Foo7 in setOf(::Foo7) inv } } fun poll87(): Flow { return flow { - val inv = ::Foo7 in setOf(foo7()) + val inv = ::Foo7 in setOf(foo7()) inv } } fun poll88(): Flow { return flow { - val inv = foo7() in setOf(::Foo7) + val inv = foo7() in setOf(::Foo7) inv } } diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.fir.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.fir.kt new file mode 100644 index 00000000000..7c70827d81c --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.fir.kt @@ -0,0 +1,12 @@ +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNUSED_PARAMETER + +class Foo + +fun getFoo(value: T) = null as Foo> +fun takeLambda(block: () -> R) {} + +fun main(x: Int) { + takeLambda { + getFoo(x) + } +} diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.kt index 20dc27e2090..3a60cb6c7e9 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/substituteCapturedTypesWithTypeVariables.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNUSED_PARAMETER class Foo @@ -10,4 +9,4 @@ fun main(x: Int) { takeLambda { getFoo(x) } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.fir.kt b/compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.fir.kt index c6002ee7223..f249cf9b507 100644 --- a/compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.fir.kt @@ -13,6 +13,6 @@ fun implicitCoercion() { val c = l@{ // Error: block doesn't have an expected type, so call can't be inferred! - return@l materialize() + return@l materialize() } } diff --git a/compiler/testData/diagnostics/tests/inference/coercionToUnit/coersionWithAnonymousFunctionsAndUnresolved.fir.kt b/compiler/testData/diagnostics/tests/inference/coercionToUnit/coersionWithAnonymousFunctionsAndUnresolved.fir.kt index af8675eefe4..23c919efea0 100644 --- a/compiler/testData/diagnostics/tests/inference/coercionToUnit/coersionWithAnonymousFunctionsAndUnresolved.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/coercionToUnit/coersionWithAnonymousFunctionsAndUnresolved.fir.kt @@ -53,7 +53,7 @@ fun testParameter() { takeFnToParameter { Unit } takeFnToParameter { unresolved() } takeFnToParameter { if (true) unresolved() } - takeFnToParameter { + takeFnToParameter { if (true) unresolved() else unresolved() } takeFnToParameter(fun() = Unit) diff --git a/compiler/testData/diagnostics/tests/inference/completion/basic.fir.kt b/compiler/testData/diagnostics/tests/inference/completion/basic.fir.kt index 9a6e6faf539..3fd3d3be002 100644 --- a/compiler/testData/diagnostics/tests/inference/completion/basic.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/completion/basic.fir.kt @@ -57,7 +57,7 @@ fun test7(cls: Cls) { } fun test8(cls: Cls) { - id( + id( wrapIn(cls) ) } diff --git a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.fir.kt b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.fir.kt index 37b9c746b52..5f5bd082bb1 100644 --- a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/basic.fir.kt @@ -78,11 +78,11 @@ fun main() { // Interdependent lambdas by input-output types aren't supported takeInterdependentLambdas({}, {}) - takeInterdependentLambdas({ it }, { 10 }) - takeInterdependentLambdas({ 10 }, { it }) - takeInterdependentLambdas({ 10 }, { x -> x }) - takeInterdependentLambdas({ x -> 10 }, { it }) - takeInterdependentLambdas({ it }, { x -> 10 }) + takeInterdependentLambdas({ it }, { 10 }) + takeInterdependentLambdas({ 10 }, { it }) + takeInterdependentLambdas({ 10 }, { x -> x }) + takeInterdependentLambdas({ x -> 10 }, { it }) + takeInterdependentLambdas({ it }, { x -> 10 }) // Dependent lambdas by input-output types takeDependentLambdas({ it }, { it }) diff --git a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt index 14000f003c9..4c7a87e33d7 100644 --- a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt @@ -1,13 +1,13 @@ // !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE -fun select(vararg x: T) = x[0] +fun select(vararg x: T) = x[0] fun id(x: K) = x fun main() { val x1 = select(id { x, y -> }, { x: Int, y -> }) - val x2 = select(id { x, y -> }, { x: Int, y -> }) + val x2 = select(id { x, y -> }, { x: Int, y -> }) - val x3 = select(id(fun (x, y) {}), fun (x: Int, y) {}) + val x3 = select(id(fun (x, y) {}), fun (x: Int, y) {}) val x4 = select((fun (x, y) {}), fun (x: Int, y) {}) val x5 = select(id(fun (x, y) {}), fun (x: Int, y) {}) diff --git a/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt index cd3a4b80909..c5801471e5a 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/constraintFromVariantTypeWithNestedProjection.fir.kt @@ -10,6 +10,6 @@ fun choose3(c: Inv>) {} fun f(o: Out>, i: In>, inv: Inv>) { choose1(o) - choose2(i) + choose2(i) choose3(inv) } diff --git a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInArguments.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInArguments.fir.kt index b11d5abb53d..5e92ba07107 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInArguments.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInArguments.fir.kt @@ -114,8 +114,8 @@ fun main(x: L?, y: L) { foo16(y, Bar()) } - Bar().foo18(x) - Bar().foo18(y) + Bar().foo18(x) + Bar().foo18(y) foo21(x, Foo(Foo(OutBar()))) foo21(y, Foo(Foo(OutBar()))) diff --git a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt index be183316214..bd156e137da 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/definitelyNotNullTypeInReturnPosition.fir.kt @@ -164,11 +164,11 @@ class Main(x: L?, y: L) { val x170 = foo17(x) val x171 = foo17(y) - val x180 = Bar().foo18(x) - val x181 = Bar().foo18(y) + val x180 = Bar().foo18(x) + val x181 = Bar().foo18(y) - val x200: L = Bar().foo19() - val x201: L = Bar().foo19() + val x200: L = Bar().foo19() + val x201: L = Bar().foo19() val x210 = foo21(x) val x211 = foo21(y) @@ -262,8 +262,8 @@ class Main(x: L?, y: L) { val x471 = foo47(y) fun takeLambda(block: () -> R): R = materialize() - val x480 = takeLambda { foo48 { x } } - val x481 = takeLambda { foo48 { y } } + val x480 = takeLambda { foo48 { x } } + val x481 = takeLambda { foo48 { y } } val x482 = takeLambda { foo48 { null } } } diff --git a/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt index 38ef8e2f11d..14a79c461bd 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/errorUpperBoundConstraint.fir.kt @@ -20,7 +20,7 @@ public class Foo { // FILE: test.kt fun test(e: ErrorType) { - Foo.foo { + Foo.foo { Sam.Result.create(e) } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/inference/constraints/kt8879.fir.kt b/compiler/testData/diagnostics/tests/inference/constraints/kt8879.fir.kt index 0900f850046..7705b37e0a4 100644 --- a/compiler/testData/diagnostics/tests/inference/constraints/kt8879.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/constraints/kt8879.fir.kt @@ -8,5 +8,5 @@ fun > foo(klass: Inv): String? = null fun bar(): Inv = null!! fun test() { - foo(bar()) + foo(bar()) } diff --git a/compiler/testData/diagnostics/tests/inference/errorsOnImplicitInvokeInSimpleCall.fir.kt b/compiler/testData/diagnostics/tests/inference/errorsOnImplicitInvokeInSimpleCall.fir.kt index a8ab368233b..38e8d1e3731 100644 --- a/compiler/testData/diagnostics/tests/inference/errorsOnImplicitInvokeInSimpleCall.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/errorsOnImplicitInvokeInSimpleCall.fir.kt @@ -1,4 +1,4 @@ inline operator fun Int.invoke() = this -val a2 = 1() -val a3 = 1.invoke() +val a2 = 1() +val a3 = 1.invoke() diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.fir.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.fir.kt index 777d65a76d1..4ae9ded5d19 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.fir.kt @@ -6,7 +6,7 @@ fun foo() = foo() as T fun foo2(): T = TODO() -val test = foo2().plus("") as String +val test = foo2().plus("") as String fun T.bar() = this val barTest = "".bar() as Number diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.fir.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.fir.kt index 20377b3b04f..4698302d0c6 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.fir.kt @@ -8,12 +8,11 @@ class A { fun id(value: V) = value -val asA = foo().fooA() as A +val asA = foo().fooA() as A -val receiverParenthesized = (foo()).fooA() as A -val no2A = A().fooA().fooA() as A - -val correct1 = A().fooA() as A -val correct2 = foo().fooA() as A -val correct3 = A().fooA().fooA() as A +val receiverParenthesized = (foo()).fooA() as A +val no2A = A().fooA().fooA() as A +val correct1 = A().fooA() as A +val correct2 = foo().fooA() as A +val correct3 = A().fooA().fooA() as A diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.fir.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.fir.kt index feb05b6775b..32f182a4bff 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.fir.kt @@ -4,17 +4,17 @@ fun foo(): T = TODO() fun id(value: V) = value -val asString = foo() as String +val asString = foo() as String -val viaId = id(foo()) as String +val viaId = id(foo()) as String -val insideId = id(foo() as String) +val insideId = id(foo() as String) -val asList = foo() as List +val asList = foo() as List -val asStarList = foo() as List<*> +val asStarList = foo() as List<*> -val safeAs = foo() as? String +val safeAs = foo() as? String -val fromIs = foo() is String -val fromNoIs = foo() !is String +val fromIs = foo() is String +val fromNoIs = foo() !is String diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt index 97d7d6566ae..ac08a6cf509 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt @@ -11,7 +11,6 @@ class A { } } -val x = A().foo() as String -val y = A.foo2() as String -val z = pp.A.foo2() as String - +val x = A().foo() as String +val y = A.foo2() as String +val z = pp.A.foo2() as String diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.fir.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.fir.kt index 0bdaa750a1c..807e949989f 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.fir.kt @@ -8,15 +8,15 @@ fun foo(): T = TODO() fun id(value: V) = value -val par1 = (foo()) as String -val par2 = ((foo())) as String +val par1 = (foo()) as String +val par2 = ((foo())) as String -val par3 = (dd@ (foo())) as String +val par3 = (dd@ (foo())) as String -val par4 = ( @bar() (foo())) as String +val par4 = ( @bar() (foo())) as String object X { fun foo(): T = TODO() } -val par5 = ( @bar() X.foo()) as String \ No newline at end of file +val par5 = ( @bar() X.foo()) as String diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.fir.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.fir.kt index ecef54717de..039bd2c4f46 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.fir.kt @@ -5,13 +5,13 @@ class X { } fun test(x: X) { - val y = x.foo() as Int + val y = x.foo() as Int } fun g() { fun foo(): T = TODO() - val y = foo() as Int + val y = foo() as Int - val y2 = foo() as D + val y2 = foo() as D } diff --git a/compiler/testData/diagnostics/tests/inference/findViewById.kt b/compiler/testData/diagnostics/tests/inference/findViewById.kt index cd085d628ed..c23deda5324 100644 --- a/compiler/testData/diagnostics/tests/inference/findViewById.kt +++ b/compiler/testData/diagnostics/tests/inference/findViewById.kt @@ -25,35 +25,35 @@ class X : View() class Y : View() val xExplicit: X = Test().findViewById(0) -val xCast = Test().findViewById(0) as X +val xCast = Test().findViewById(0) as X val xCastExplicitType = Test().findViewById(0) as X val xSafeCastExplicitType = Test().findViewById(0) as? X val yExplicit: Y = Test().findViewById(0) -val yCast = Test().findViewById(0) as Y +val yCast = Test().findViewById(0) as Y class TestChild : Test() { val xExplicit: X = findViewById(0) - val xCast = findViewById(0) as X + val xCast = findViewById(0) as X val yExplicit: Y = findViewById(0) - val yCast = findViewById(0) as Y + val yCast = findViewById(0) as Y } fun test(t: Test) { val xExplicit: X = t.findViewById(0) - val xCast = t.findViewById(0) as X + val xCast = t.findViewById(0) as X val yExplicit: Y = t.findViewById(0) - val yCast = t.findViewById(0) as Y + val yCast = t.findViewById(0) as Y } fun test2(t: Test?) { - val xSafeCallSafeCast = t?.findViewById(0) as? X + val xSafeCallSafeCast = t?.findViewById(0) as? X val xSafeCallSafeCastExplicitType = t?.findViewById(0) as? X - val xSafeCallCast = t?.findViewById(0) as X + val xSafeCallCast = t?.findViewById(0) as X val xSafeCallCastExplicitType = t?.findViewById(0) as X } diff --git a/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.fir.kt b/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.fir.kt index 783a432646c..d7c2a15c718 100644 --- a/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.fir.kt @@ -12,5 +12,5 @@ fun test() { val q = foo(fun Int.() {}, emptyList()) //type inference no information for parameter error checkSubtype(q) - foo({}, emptyList()) + foo({}, emptyList()) } diff --git a/compiler/testData/diagnostics/tests/inference/kt28654.fir.kt b/compiler/testData/diagnostics/tests/inference/kt28654.fir.kt index 5fedeedb88e..f1462e61313 100644 --- a/compiler/testData/diagnostics/tests/inference/kt28654.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/kt28654.fir.kt @@ -5,5 +5,5 @@ fun select(): K = run { } fun test() { val x: Int = select() - val t = select() + val t = select() } diff --git a/compiler/testData/diagnostics/tests/inference/kt30405.kt b/compiler/testData/diagnostics/tests/inference/kt30405.kt index a122c529868..dc3ac4939f0 100644 --- a/compiler/testData/diagnostics/tests/inference/kt30405.kt +++ b/compiler/testData/diagnostics/tests/inference/kt30405.kt @@ -8,9 +8,9 @@ inline fun foo(): T { } fun test() { - val fooCall = foo() as String // T in foo should be inferred to String + val fooCall = foo() as String // T in foo should be inferred to String fooCall checkType { _() } - val safeFooCall = foo() as? String + val safeFooCall = foo() as? String safeFooCall checkType { _() } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/inference/kt39220.fir.kt b/compiler/testData/diagnostics/tests/inference/kt39220.fir.kt index 124d0cbdfe5..4a470f16040 100644 --- a/compiler/testData/diagnostics/tests/inference/kt39220.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/kt39220.fir.kt @@ -86,12 +86,12 @@ fun main() { // with LHS and conflicting projection bar2(Foo::resolve) bar2(Foo::resolve) - bar2(Foo::resolve) + bar2(Foo::resolve) // with LHS and Any? expected type bar3(Foo::resolve) bar3(Foo::resolve) - bar3(Foo::resolve) + bar3(Foo::resolve) // with LHS and `Function` expected type bar4(Foo::resolve) // ERROR before the fix in NI diff --git a/compiler/testData/diagnostics/tests/inference/kt40396.fir.kt b/compiler/testData/diagnostics/tests/inference/kt40396.fir.kt index c5f56f12b7c..ae1f52903de 100644 --- a/compiler/testData/diagnostics/tests/inference/kt40396.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/kt40396.fir.kt @@ -8,6 +8,6 @@ class Foo { } class Bar { - val bar = foo {} + val bar = foo {} val baz = foo {} -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt b/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt index 5c070a721cc..be734e6e9e1 100644 --- a/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/kt6175.fir.kt @@ -3,11 +3,11 @@ fun foo(body: (R?) -> T): T = fail() fun test1() { - foo { - true + foo { + true } - foo { x -> - true + foo { x -> + true } } @@ -15,33 +15,33 @@ fun test1() { fun bar(body: (R) -> T): T = fail() fun test2() { - bar { - true + bar { + true } - bar { x -> - true + bar { x -> + true } } fun baz(body: (List) -> T): T = fail() fun test3() { - baz { - true + baz { + true } - baz { x -> - true + baz { x -> + true } } fun brr(body: (List) -> T): T = fail() fun test4() { - brr { - true + brr { + true } - brr { x -> - true + brr { x -> + true } } diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.fir.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.fir.kt index f3288b9f04d..bab21744e83 100644 --- a/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.fir.kt @@ -13,7 +13,7 @@ fun id(t: T): T = t infix fun Z.foo(a: A): A = a fun test(z: Z) { - z foo newA() + z foo newA() val a: A = id(z foo newA()) val b: A = id(z.foo(newA())) use(a, b) @@ -23,7 +23,7 @@ fun test(z: Z) { operator fun Z.plus(a: A): A = a fun test1(z: Z) { - id(z + newA()) + id(z + newA()) val a: A = z + newA() val b: A = z.plus(newA()) val c: A = id(z + newA()) @@ -35,7 +35,7 @@ fun test1(z: Z) { operator fun Z.compareTo(a: A): Int { use(a); return 1 } fun test2(z: Z) { - val a: Boolean = id(z < newA()) + val a: Boolean = id(z < newA()) val b: Boolean = id(z < newA()) use(a, b) } @@ -44,18 +44,18 @@ fun test2(z: Z) { fun Z.equals(any: Any): Int { use(any); return 1 } fun test3(z: Z) { - z == newA() + z == newA() z == newA() - id(z == newA()) + id(z == newA()) id(z == newA()) - id(z === newA()) + id(z === newA()) id(z === newA()) } //'in' operation fun test4(collection: Collection>) { - id(newA() in collection) + id(newA() in collection) id(newA() in collection) } @@ -63,7 +63,7 @@ fun test4(collection: Collection>) { fun toBeOrNot(): Boolean = throw Exception() fun test5() { - if (toBeOrNot() && toBeOrNot()) {} + if (toBeOrNot() && toBeOrNot()) {} if (toBeOrNot() && toBeOrNot()) {} } diff --git a/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.fir.kt b/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.fir.kt index 27b21b764ca..4626bc7acbd 100644 --- a/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.fir.kt @@ -19,7 +19,7 @@ fun testAnyCall() { } fun testParam() { - callParam { + callParam { param -> param } } diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt index 61352d7e646..629ba139ae2 100644 --- a/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nothingType/implicitInferenceTToFlexibleNothing.fir.kt @@ -7,5 +7,5 @@ import java.util.* fun foo (f: () -> List): T = null as T fun main() { - val x = foo { Collections.emptyList() } + val x = foo { Collections.emptyList() } } diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/kt34335.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/kt34335.fir.kt index 6906a043c27..0b28939d4ac 100644 --- a/compiler/testData/diagnostics/tests/inference/nothingType/kt34335.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nothingType/kt34335.fir.kt @@ -14,5 +14,5 @@ fun test1() { } fun test2() { - ::foo.call({ x -> println(x::class) }) + ::foo.call({ x -> println(x::class) }) } diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt index 2c65f9d32db..51509e7a3d0 100644 --- a/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt @@ -5,7 +5,7 @@ class Inv fun materialize(): Inv = TODO() fun id(arg: K) = arg -fun select(vararg args: S): S = TODO() +fun select(vararg args: S): S = TODO() fun test1(b: Boolean?) { val v = when(b) { @@ -17,20 +17,20 @@ fun test1(b: Boolean?) { } fun test2() { - select( + select( materialize() - ) + ) select(materialize(), materialize()) select(materialize(), null, Inv()) select( materialize(), null ) - select( + select( materialize(), materialize() - ) - select( + ) + select( materialize(), materialize(), null diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationFromNullabilityConstraint.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationFromNullabilityConstraint.fir.kt index 6b0f2ae6009..bfbaeacf144 100644 --- a/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationFromNullabilityConstraint.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationFromNullabilityConstraint.fir.kt @@ -5,7 +5,7 @@ fun id(arg: I): I = arg fun select(vararg args: S): S = TODO() fun test() { - id( + id( make() ) diff --git a/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.fir.kt b/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.fir.kt index f98ff2c781a..7769b0e9122 100644 --- a/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.fir.kt @@ -6,7 +6,7 @@ fun g (f: () -> List) : T {} fun test() { //here possibly can be a cycle on constraints - val x = g { Collections.emptyList() } + val x = g { Collections.emptyList() } val y = g { Collections.emptyList() } val z : List = g { Collections.emptyList() } diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt index 9ec2e2eb8a8..f7389bc17e1 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt @@ -5,7 +5,7 @@ package n import checkSubtype fun main() { - val a = array(array()) + val a = array(array()) val a0 : Array> = array(array()) val a1 = array(array()) checkSubtype>>(a1) @@ -15,4 +15,4 @@ fun main() { //from library @Suppress("UNCHECKED_CAST") -fun array(vararg t : T) : Array = t as Array +fun array(vararg t : T) : Array = t as Array 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 f905fc93d25..508c3a8bd1b 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt @@ -3,7 +3,7 @@ fun id(arg: K): K = arg fun materialize(): M = TODO() fun test(b: Boolean) { - id(if (b) { + id(if (b) { id(unresolved) } else { id( diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt index fd7ffbafc96..ad3f1c83b1b 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.fir.kt @@ -4,6 +4,5 @@ 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 bcd8fb2c80a..2fa0b22eb32 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.fir.kt @@ -10,7 +10,7 @@ fun test() { foo { x -> x} foo { x: Int -> x} - bar { it + 1 } - bar { x -> x + 1} + bar { it + 1 } + bar { x -> x + 1} bar { x: Int -> x + 1} } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt index f1d7133a179..2cb7a4d8b95 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.fir.kt @@ -3,9 +3,9 @@ package aa fun foo(block: (T)-> R) = block fun test1() { - foo { - x -> // here we have 'cannot infer parameter type' error - 43 + foo { + x -> // here we have 'cannot infer parameter type' error + 43 } } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt index d48ecba5b77..a835794c0b3 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/inferTypeFromUnresolvedArgument.fir.kt @@ -7,6 +7,6 @@ fun test() { id2(unresolved, "foo") id2(unresolved, 42) - ret("foo") + ret("foo") ret(42) } diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.fir.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.fir.kt index 95a68b2dc1e..99b9cab228b 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.fir.kt @@ -3,6 +3,6 @@ class X operator fun X.iterator(): Iterable = TODO() fun test() { - for (i in X()) { + for (i in X()) { } } diff --git a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt index ead2b250578..7a5e81bbfaf 100644 --- a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt @@ -284,7 +284,7 @@ fun poll82() { } fun poll83() { - val inv = ::bar4 in setOf(::foo4) + val inv = ::bar4 in setOf(::foo4) inv } @@ -299,16 +299,16 @@ fun poll85() { } fun poll86() { - val inv = ::Foo7 in setOf(::Foo7) + val inv = ::Foo7 in setOf(::Foo7) inv } fun poll87() { - val inv = ::Foo7 in setOf(foo7()) + val inv = ::Foo7 in setOf(foo7()) inv } fun poll88() { - val inv = foo7() in setOf(::Foo7) + val inv = foo7() in setOf(::Foo7) inv } diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.fir.kt index f1293c38a1c..1bfc4ce9e6e 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.fir.kt @@ -5,7 +5,7 @@ interface A fun emptyList(): List = throw Exception() fun test1() { - emptyList() + emptyList() } //-------------- @@ -13,7 +13,7 @@ fun test1() { fun emptyListOfA(): List = throw Exception() fun test2() { - emptyListOfA() + emptyListOfA() } //-------------- @@ -21,7 +21,7 @@ fun test2() { fun emptyStrangeMap(): Map = throw Exception() fun test3() { - emptyStrangeMap() + emptyStrangeMap() } //-------------- diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.fir.kt index 252b7fedfcb..17d46032df7 100644 --- a/compiler/testData/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.fir.kt @@ -10,5 +10,5 @@ class Bar(val x: Inv>) fun materializeFoo(): Inv = null as Inv fun main() { - Bar(materializeFoo()) -} \ No newline at end of file + Bar(materializeFoo()) +} diff --git a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.fir.kt b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.fir.kt index 83de3deb13a..f1e6e105b98 100644 --- a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.fir.kt @@ -4,6 +4,6 @@ class Outer { } fun nested() = Outer.Nested() -fun noArguments() = Outer.Nested() +fun noArguments() = Outer.Nested() fun noArgumentsExpectedType(): Outer.Nested = Outer.Nested() -fun manyArguments() = Outer.Nested() +fun manyArguments() = Outer.Nested<String, Int>() 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 56b2b0ef877..81b79c2af59 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.fir.kt @@ -11,10 +11,10 @@ public class A { // TODO: It's effectively impossible to perform super call to such constructor // 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 B1(x: List) : A("", x) class B2(x: List) : A("", x) class C : A { - constructor(x: List) : super("", x) + constructor(x: List) : super("", x) constructor(x: List, y: Int) : super("", x) } diff --git a/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.fir.kt b/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.fir.kt index f5979eeaf51..ad7bdee682e 100644 --- a/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.fir.kt @@ -20,9 +20,9 @@ public abstract class CollectionWithSize implements java.util.Collection // FILE: main.kt fun main(c: CollectionWithSize) { - CompressionType.ZIP.name checkType { _() } - c.size checkType { _() } + CompressionType.ZIP.name checkType { _() } + c.size checkType { _() } - CompressionType.ZIP::name checkType { _>() } - c::size checkType { _>() } + CompressionType.ZIP::name checkType { _>() } + c::size checkType { _>() } } diff --git a/compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.fir.kt b/compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.fir.kt index f74336ba78b..a67ee7e003e 100644 --- a/compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.fir.kt +++ b/compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.fir.kt @@ -11,6 +11,6 @@ public class A { // FILE: main.kt fun foo(a: A) { - a.foo() checkType { _() } - A.bar() checkType { _() } + a.foo() checkType { _() } + A.bar() checkType { _() } } diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt index a86fd732d95..b57e9568f15 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt @@ -19,6 +19,6 @@ public class J { // FILE: k.kt -var A by J.staticNN +var A by J.staticNN var B by J.staticN -var C by J.staticJ \ No newline at end of file +var C by J.staticJ diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt index 6d800786d9a..d2f8831090f 100644 --- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt +++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.fir.kt @@ -7,8 +7,8 @@ val x get() { } // cantBeInferred.kt -val x1 get() = foo() -val y1 get() = bar() +val x1 get() = foo() +val y1 get() = bar() fun foo(): E = null!! fun bar(): List = null!! diff --git a/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt b/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt index b6638f51169..24ae58e45d9 100644 --- a/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.fir.kt @@ -1,7 +1,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/kt31975.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt31975.fir.kt index 16b68bfe678..c6ce0a755c6 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt31975.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt31975.fir.kt @@ -10,7 +10,7 @@ interface A interface TypeConstructor class Refiner { - val memoizedFunctionLambda = createMemoizedFunction { it.foo() } // error type infered, no diagnostic, BAD, backend fails + val memoizedFunctionLambda = createMemoizedFunction { it.foo() } // error type infered, no diagnostic, BAD, backend fails val memoizedFunctionReference = createMemoizedFunction(TypeConstructor::foo) // EXTENSION_IN_CLASS_REFERENCE_IS_NOT_ALLOWED, fine val memoizedFunctionTypes = createMemoizedFunction { it.foo() } // works fine diff --git a/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.fir.kt b/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.fir.kt index 2b9e8280bc3..6e6eb1a62ae 100644 --- a/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.fir.kt +++ b/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.fir.kt @@ -22,9 +22,9 @@ public interface J { // FILE: 1.kt fun test(j: J) { - j.foo({ it checkType { _() }; "" }, "") checkType { _() } + j.foo({ it checkType { _() }; "" }, "") checkType { _() } - j.bas({ it checkType { _() }; "" }, "") checkType { _() } + j.bas({ it checkType { _() }; "" }, "") checkType { _() } // NI: TODO j.bar { it checkType { _() }; "" } checkType { _() } diff --git a/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.fir.kt b/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.fir.kt index 175ebce069f..02c4eb2f0f4 100644 --- a/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.fir.kt +++ b/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.fir.kt @@ -21,9 +21,9 @@ interface K { } fun test(k: K) { - k.foo { it checkType { _() }; "" } checkType { _() } + k.foo { it checkType { _() }; "" } checkType { _() } - k.bas { it checkType { _() }; "" } checkType { _() } + k.bas { it checkType { _() }; "" } checkType { _() } // NI: TODO k.bar { it checkType { _() }; "" } checkType { _() } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt index 710474c204b..e599d730eba 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt @@ -24,4 +24,4 @@ val y7: B = B(1) val y8: B = B("") val y9 = B(1) -val y10 = B("") +val y10 = B("") diff --git a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.fir.kt index e6af93cd7ea..9d6aa96915a 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.fir.kt @@ -32,6 +32,6 @@ fun test() { x.baz(1).checkType { _() } x.baz(1, 2) - x.foobar().checkType { _() } + x.foobar().checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.fir.kt b/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.fir.kt index 5bd52843497..4e34471c2bd 100644 --- a/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.fir.kt @@ -4,5 +4,5 @@ fun f1(l: List2): T {throw Exception()} // ERR fun f1(c: Collection): T{throw Exception()} fun test(l: List) { - f1(l) + f1(l) } diff --git a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt index c12fb741a3f..43d5f154075 100644 --- a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt +++ b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt @@ -7,7 +7,7 @@ interface A : MutableCollection { } fun foo(x: MutableCollection, y: Collection, z: A) { - x.nonExistingMethod(1).checkType { _() } + x.nonExistingMethod(1).checkType { _() } y.nonExistingMethod("") z.nonExistingMethod("") } diff --git a/compiler/testData/diagnostics/tests/typeParameters/implicitNothingAgainstNotNothingExpectedType.fir.kt b/compiler/testData/diagnostics/tests/typeParameters/implicitNothingAgainstNotNothingExpectedType.fir.kt index 7a8ea91d5bb..0e594a8c4cd 100644 --- a/compiler/testData/diagnostics/tests/typeParameters/implicitNothingAgainstNotNothingExpectedType.fir.kt +++ b/compiler/testData/diagnostics/tests/typeParameters/implicitNothingAgainstNotNothingExpectedType.fir.kt @@ -42,12 +42,12 @@ fun test() { val foo = Foo() val x9: String? = select(foo.materialize(), null) - val x10: String? = select(foo.idFromClassTypeArgWithAnotherTypeArg(), null) + val x10: String? = select(foo.idFromClassTypeArgWithAnotherTypeArg(), null) val x11: String? = select(foo.idFromClassTypeArg(), null) foo.run { val x12: String? = select(materialize(), null) - val x13: String? = select(idFromClassTypeArgWithAnotherTypeArg(), null) + val x13: String? = select(idFromClassTypeArgWithAnotherTypeArg(), null) val x14: String? = select(idFromClassTypeArg(), null) } diff --git a/compiler/testData/diagnostics/tests/typealias/inGenerics.kt b/compiler/testData/diagnostics/tests/typealias/inGenerics.kt index 6c0136ab553..b57099ff472 100644 --- a/compiler/testData/diagnostics/tests/typealias/inGenerics.kt +++ b/compiler/testData/diagnostics/tests/typealias/inGenerics.kt @@ -10,4 +10,4 @@ val ms: MyString = "MyString" val msn: MyString? = null val msc: MyStringContainer = Container(ms) -val msc1 = MyStringContainer(null) \ No newline at end of file +val msc1 = MyStringContainer(null) diff --git a/compiler/testData/diagnostics/tests/typealias/localTypeAlias.fir.kt b/compiler/testData/diagnostics/tests/typealias/localTypeAlias.fir.kt index ee1ea1d2aba..6cd1ae396be 100644 --- a/compiler/testData/diagnostics/tests/typealias/localTypeAlias.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/localTypeAlias.fir.kt @@ -5,7 +5,7 @@ fun emptyList(): List = null!! fun foo() { typealias LT = List - val a: LT = emptyList() + val a: LT = emptyList() fun localFun(): LT { typealias LLT = List diff --git a/compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.fir.kt b/compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.fir.kt index cb145353a7c..580fe6ce826 100644 --- a/compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.fir.kt @@ -19,5 +19,5 @@ val p2 = Pair(1, "") val test1: Int = C().first(p1) val test2: Int = C().second(p1) -val test3: Int = C().first2(p2) -val test4: String = C().second2(p2) +val test3: Int = C().first2(p2) +val test4: String = C().second2(p2) diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt index 1556957f654..69efab98b49 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.fir.kt @@ -12,4 +12,4 @@ fun listOf(): List = null!! // since it has 'out' type projection in 'in' position. val test1 = BOutIn(listOf(), null!!) -val test2 = BInIn(listOf(), null!!) +val test2 = BInIn(listOf(), null!!) diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.fir.kt index 2a132cb3675..0143bd4c4dd 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.fir.kt @@ -7,8 +7,8 @@ typealias CIn = C typealias COut = C typealias CT = C -val test1 = CStar() -val test2 = CIn() -val test3 = COut() +val test1 = CStar() +val test2 = CIn() +val test3 = COut() val test4 = CT<*>() val test5 = CT>() diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt index 78d88ce75c9..feb5791551f 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt @@ -8,10 +8,10 @@ typealias PIntIntA = Pair typealias PA = Pair typealias P2A = Pair -val test1 = CIntA(10) +val test1 = CIntA(10) val test2 = CA(10) val test3 = CA(10) -val test4 = PIntIntA(10, 20) +val test4 = PIntIntA(10, 20) val test5 = PA(10, 20) val test6 = PA(10, 20) val test7 = P2A(10, 20) diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt index 41652b12938..e3992a08ef6 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.fir.kt @@ -13,7 +13,7 @@ fun foo() { takeUByte(id(1)) 1 + 1u - (1u + 1) checkType { _() } + (1u + 1) checkType { _() } id(1) } diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/overloadResolutionForSignedAndUnsignedTypes.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/overloadResolutionForSignedAndUnsignedTypes.fir.kt index 4b5009d5183..26ff62bee63 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/overloadResolutionForSignedAndUnsignedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/overloadResolutionForSignedAndUnsignedTypes.fir.kt @@ -21,7 +21,7 @@ fun test() { foo(1) checkType { _() } foo(1u) checkType { _() } - foo(2147483648) checkType { _() } + foo(2147483648) checkType { _() } foo(2147483647 + 1) checkType { _() } fooByte(1) checkType { _() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt index 2657730ab42..e8112bf7a40 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/inferCoroutineTypeInOldVersion.fir.kt @@ -12,18 +12,18 @@ fun Builder.extensionAdd(s: S) {} suspend fun Builder.safeExtensionAdd(s: S) {} -val member = build { - add(42) +val member = build { + add(42) } -val memberWithoutAnn = wrongBuild { - add(42) +val memberWithoutAnn = wrongBuild { + add(42) } -val extension = build { - extensionAdd("foo") +val extension = build { + extensionAdd("foo") } -val safeExtension = build { - safeExtensionAdd("foo") +val safeExtension = build { + safeExtensionAdd("foo") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.fir.kt index 76fa4fb0803..bf6be779791 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/builderInference/resolveUsualCallWithBuilderInferenceWithRestrictions.fir.kt @@ -24,8 +24,8 @@ val member = build { add(42) } -val memberWithoutAnn = wrongBuild { - add(42) +val memberWithoutAnn = wrongBuild { + add(42) } val extension = build { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.fir.kt index 5c477341c78..65944594df3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.fir.kt @@ -8,6 +8,6 @@ class Scope(private val implClass: filter(implClass::isInstance) .map(implClass::cast) - .toSet() + .toSet() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt index a17fc61bc2f..4b09001f5bb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/applyInsideCoroutine.fir.kt @@ -7,26 +7,26 @@ class Controller { fun generate(g: suspend Controller.() -> Unit): S = TODO() -val test1 = generate { - apply { - yield(4) +val test1 = generate { + apply { + yield(4) } } -val test2 = generate { - yield(B) - apply { - yield(C) +val test2 = generate { + yield(B) + apply { + yield(C) } } -val test3 = generate { - this.let { - yield(B) +val test3 = generate { + this.let { + yield(B) } - apply { - yield(C) + apply { + yield(C) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.fir.kt index c4e148f9937..43af55bbe82 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.fir.kt @@ -28,7 +28,7 @@ val test1 = generate { baseExtension() } -val test2 = generate { +val test2 = generate { baseExtension() } 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 030107672a2..314b0fe2855 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 @@ -11,7 +11,7 @@ fun generate(g: suspend Controller.() -> Unit): S = TODO() suspend fun Base.baseExtension() {} -val test1 = generate { - yield("foo") +val test1 = generate { + yield("foo") baseExtension() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt35684.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt35684.fir.kt index a6573fc2c0f..be1ab371349 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt35684.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt35684.fir.kt @@ -13,7 +13,7 @@ fun test_1() { } fun test_2() { - sequence { + sequence { yield(materialize()) } } @@ -21,7 +21,7 @@ fun test_2() { fun test_3() { sequence { yield(materialize()) - materialize() + materialize() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt index 7acf8f857a6..417b1782581 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt @@ -16,10 +16,10 @@ fun MyProducerScope<*>.myAwaitClose(block: () -> Unit = {}) {} fun myEmptyFlow(): MyFlow = null!! fun test(): MyFlow { - return select( - ")!>myCallbackFlow , kotlin.Unit>")!>{ + return select( + ")!>myCallbackFlow , kotlin.Unit>")!>{ myAwaitClose {} }, myEmptyFlow() - ) + ) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.fir.kt index e83d71ecc14..82516302fb1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.fir.kt @@ -14,5 +14,5 @@ public class P { fun foo(c: P): MutableList { // Error should be here: see KT-8168 Typechecker fails for platform collection type - return c.getList() ?: listOf() + return c.getList() ?: listOf() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.fir.kt index c35dd9409ca..5943c9ad7e7 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.fir.kt @@ -23,7 +23,7 @@ public class StaticOverrides { // FILE: test.kt fun test() { - StaticOverrides.A.foo {} checkType { _() } + StaticOverrides.A.foo {} checkType { _() } StaticOverrides.B.foo {} checkType { _() } - StaticOverrides.C.foo {} checkType { _() } + StaticOverrides.C.foo {} checkType { _() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.fir.kt index 8c946684397..7835e3e4cae 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.fir.kt @@ -19,6 +19,6 @@ class Foo { // FILE: 1.kt fun test() { - Foo().foo {} checkType { _() } - Foo().bar {} checkType { _() } + Foo().foo {} checkType { _() } + Foo().bar {} checkType { _() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt index a806eb5b43e..093763bbf37 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.fir.kt @@ -20,6 +20,6 @@ class Foo { // FILE: 1.kt fun test() { - Foo().foo {} checkType { _() } - Foo().bar {} checkType { _() } + Foo().foo {} checkType { _() } + Foo().bar {} checkType { _() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.fir.kt index b51fb3e82d5..0b789adf874 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.fir.kt @@ -16,5 +16,5 @@ public class Foo { // FILE: 1.kt fun bar() { - Foo().test {} checkType { _() } + Foo().test {} checkType { _() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt index fc08ccbb3da..8d824ce395b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.fir.kt @@ -17,5 +17,5 @@ public class Foo { // FILE: 1.kt fun bar() { - Foo().test {} checkType { _() } + Foo().test {} checkType { _() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.fir.kt new file mode 100644 index 00000000000..f04034ec293 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.fir.kt @@ -0,0 +1,8 @@ +// FILE: test.kt +typealias RunnableT = java.lang.Runnable +typealias ComparatorT = java.util.Comparator +typealias ComparatorStrT = ComparatorT + +val test1 = RunnableT { } +val test2 = ComparatorT { s1, s2 -> s1.compareTo(s2) } +val test3 = ComparatorStrT { s1, s2 -> s1.compareTo(s2) } diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt index cdb81eea98e..a5e4f8db692 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt @@ -1,4 +1,3 @@ -// FIR_IDENTICAL // FILE: test.kt typealias RunnableT = java.lang.Runnable typealias ComparatorT = java.util.Comparator diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt index 25041c6bcef..253a8e7aaaa 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt @@ -22,6 +22,6 @@ typealias C2 = JHost.Consumer2 val test1 = R { } val test2 = C { s -> println(s.length) } -val test3 = CStr { s -> println(s.length) } -val test4 = CStrList { ss -> for (s in ss) { println(s.length) } } -val test5 = C2 { a, b -> val x: Int = a + b; println(x)} +val test3 = CStr { s -> println(s.length) } +val test4 = CStrList { ss -> for (s in ss) { println(s.length) } } +val test5 = C2<Int> { a, b -> val x: Int = a + b; println(x)} diff --git a/compiler/testData/diagnostics/testsWithStdLib/when/kt10807.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/when/kt10807.fir.kt index 4c92314b803..7f207767e3a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/when/kt10807.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/when/kt10807.fir.kt @@ -5,13 +5,13 @@ import kotlin.comparisons.nullsLast class Foo(val a: String, val b: Int) fun getComp(): Comparator = - when { - else -> nullsLast(compareBy({ it.a }, { it.b })) - } + when { + else -> nullsLast(compareBy({ it.a }, { it.b })) + } fun getCompInverted(): Comparator = - nullsLast( + nullsLast( when { - else -> compareBy({ it.a }, { it.b }) + else -> compareBy({ it.a }, { it.b }) } - ) + ) diff --git a/compiler/testData/ir/irText/expressions/kt47082.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt47082.fir.kt.txt index b65b6369b91..f8b9aec78df 100644 --- a/compiler/testData/ir/irText/expressions/kt47082.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt47082.fir.kt.txt @@ -20,7 +20,7 @@ fun > Receiver.toChannel(destination: C): C { fun foo(r: Receiver): R { return produce(block = local fun Derived.() { - r.toChannel>(destination = ) /*~> Unit */ + r.toChannel>(destination = ) /*~> Unit */ } ) } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.1.fir.kt index 9acef5d0174..f494f8ebaee 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/the-types-for-integer-literals/p-1/neg/2.1.fir.kt @@ -2,10 +2,10 @@ // TESTCASE NUMBER: 1 fun case_1() { - 0l checkType { check() } - 10000000000000l checkType { check() } - 0X000Af10cDl checkType { check() } - 0x0_0l checkType { check() } - 0b100_000_111_111l checkType { check() } - 0b0l checkType { check() } + 0l checkType { check() } + 10000000000000l checkType { check() } + 0X000Af10cDl checkType { check() } + 0x0_0l checkType { check() } + 0b100_000_111_111l checkType { check() } + 0b0l checkType { check() } } 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 5a920ee4ba6..47636fc59f6 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 @@ -105,8 +105,8 @@ fun case_6() { checkSubtype(-100000000000000000000000000000000) checkSubtype(-100000000000000000000000000000000) checkSubtype(-100000000000000000000000000000000) - -100000000000000000000000000000000 checkType { check() } - -100000000000000000000000000000000 checkType { check() } - -100000000000000000000000000000000 checkType { check() } - -100000000000000000000000000000000 checkType { check() } + -100000000000000000000000000000000 checkType { check() } + -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 91a3feda298..f3113609672 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 @@ -3,23 +3,23 @@ // TESTCASE NUMBER: 1 fun case_1() { checkSubtype(-9223372036854775808L) - -9223372036854775808L checkType { check() } + -9223372036854775808L checkType { check() } checkSubtype(9223372036854775808L) - 9223372036854775808L checkType { check() } + 9223372036854775808L checkType { check() } } // TESTCASE NUMBER: 2 fun case_2() { checkSubtype(100000000000000000000000000000000L) - 100000000000000000000000000000000L checkType { check() } + 100000000000000000000000000000000L checkType { check() } checkSubtype(100000000000000000000000000000000l) - 100000000000000000000000000000000l checkType { check() } + 100000000000000000000000000000000l checkType { check() } checkSubtype(-100000000000000000000000000000000L) - -100000000000000000000000000000000L checkType { check() } + -100000000000000000000000000000000L checkType { check() } checkSubtype(-100000000000000000000000000000000l) - -100000000000000000000000000000000l checkType { check() } + -100000000000000000000000000000000l checkType { check() } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.fir.kt index d19f90641af..7102100ebc8 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/choosing-the-most-specific-candidate-from-the-overload-candidate-set/algorithm-of-msc-selection/p-14/neg/1.5.fir.kt @@ -19,7 +19,7 @@ import testPackCase1.I4.Companion.foo class Case1() : I2, I1, I3, I4 { fun test() { - foo(1) + foo(1) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.fir.kt index 24c983e97d2..2f499575450 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/22.fir.kt @@ -167,7 +167,7 @@ fun case_12(x: Int?) { val y: Int while (true) { - break[x!!] + break[x!!] } x diff --git a/idea/testData/checker/ResolveToJava.fir.kt b/idea/testData/checker/ResolveToJava.fir.kt index 99f3e23c85c..729699a3dbd 100644 --- a/idea/testData/checker/ResolveToJava.fir.kt +++ b/idea/testData/checker/ResolveToJava.fir.kt @@ -21,7 +21,7 @@ fun test(l : List) { Collections.emptyList Collections.emptyList Collections.emptyList() - Collections.emptyList() + Collections.emptyList() checkSubtype?>(Collections.singleton(1)) Collections.singleton(1.0) diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt index 4e5d5c365ff..25deeb39897 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt @@ -5,5 +5,3 @@ package server data class Data // DISABLE-ERRORS - -// FIR_COMPARISON \ No newline at end of file