diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt index e8c8b52ef8a..53f5bad4982 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt @@ -158,7 +158,12 @@ class KotlinCallCompleter( // this is needed at least for non-local return checker, because when we analyze lambda we should already bind descriptor for outer call candidate?.resolvedCall?.let { - resolutionCallbacks.bindStubResolvedCallForCandidate(it) + val mayNeedDescriptor = it.argumentToCandidateParameter.keys.any { arg -> + arg is LambdaKotlinCallArgument + } + if (mayNeedDescriptor) { + resolutionCallbacks.bindStubResolvedCallForCandidate(it) + } resolutionCallbacks.disableContractsIfNecessary(it) } diff --git a/compiler/testData/cfg/arrays/arrayIncUnresolved.instructions b/compiler/testData/cfg/arrays/arrayIncUnresolved.instructions index db3e101c3a3..00e2c457590 100644 --- a/compiler/testData/cfg/arrays/arrayIncUnresolved.instructions +++ b/compiler/testData/cfg/arrays/arrayIncUnresolved.instructions @@ -25,8 +25,7 @@ L0: r(a) -> r(0) -> magic[UNRESOLVED_CALL](a[0]|, ) -> - mark(a[0]++) - call(a[0]++, |) -> + magic[UNRESOLVED_CALL](a[0]++|) -> magic[UNRESOLVED_CALL](a[0]++|, ) -> L1: 1 NEXT:[] diff --git a/compiler/testData/cfg/bugs/kt10105.instructions b/compiler/testData/cfg/bugs/kt10105.instructions index bf1d6cd417c..0c5a9a96eb6 100644 --- a/compiler/testData/cfg/bugs/kt10105.instructions +++ b/compiler/testData/cfg/bugs/kt10105.instructions @@ -10,14 +10,13 @@ L0: mark(= ()) magic[UNRESOLVED_CALL](= ()) -> mark(= ()()) - call(= ()(), |) -> - magic[VALUE_CONSUMER](= ()()|) -> + magic[UNRESOLVED_CALL](= ()()|) -> mark(int x = ()()) - call(int x = ()(), |) -> + magic[UNRESOLVED_CALL](int x = ()()|, ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/bugs/kt10105.values b/compiler/testData/cfg/bugs/kt10105.values index 6c3e64efa24..62eeff98fa5 100644 --- a/compiler/testData/cfg/bugs/kt10105.values +++ b/compiler/testData/cfg/bugs/kt10105.values @@ -3,10 +3,9 @@ fun foo() { int x = ()() } --------------------- - : * NEW: magic[VALUE_CONSUMER](= ()()|) -> int : * NEW: magic[UNRESOLVED_CALL](int) -> = () : * NEW: magic[UNRESOLVED_CALL](= ()) -> -= ()() : * NEW: call(= ()(), |) -> -int x = ()() : * NEW: call(int x = ()(), |) -> -{ int x = ()() } : * COPY += ()() : * NEW: magic[UNRESOLVED_CALL](= ()()|) -> +int x = ()() : * NEW: magic[UNRESOLVED_CALL](int x = ()()|, ) -> +{ int x = ()() } : * COPY ===================== diff --git a/compiler/testData/cfg/bugs/kt7761.instructions b/compiler/testData/cfg/bugs/kt7761.instructions index 1adab405bd9..483e6a30d78 100644 --- a/compiler/testData/cfg/bugs/kt7761.instructions +++ b/compiler/testData/cfg/bugs/kt7761.instructions @@ -57,25 +57,22 @@ L0: mark() magic[UNRESOLVED_CALL]() -> mark(x<) - call(x<, |) -> - magic[VALUE_CONSUMER](>++|!) -> + magic[UNRESOLVED_CALL](x<|) -> mark(x++) - call(x++, |) -> + magic[UNRESOLVED_CALL](x++|, !) -> mark(/error>) - magic[UNRESOLVED_CALL](/error>) -> - magic[VALUE_CONSUMER](/error>|) -> + magic[UNRESOLVED_CALL](/error>) -> mark(x++) - call(x++, |) -> + magic[UNRESOLVED_CALL](x++|, ) -> mark(/warning>) - magic[UNRESOLVED_CALL](/warning>) -> - magic[VALUE_CONSUMER](/warning>|) -> + magic[UNRESOLVED_CALL](/warning>) -> mark(x++) - call(x++, |) -> - w(x|) + magic[UNRESOLVED_CALL](x++|, ) -> + w(x|) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/bugs/kt7761.values b/compiler/testData/cfg/bugs/kt7761.values index eb1762564fe..c263fe3397d 100644 --- a/compiler/testData/cfg/bugs/kt7761.values +++ b/compiler/testData/cfg/bugs/kt7761.values @@ -19,18 +19,15 @@ fun testUnitIncDec() { x = x++ } --------------------- - : * NEW: magic[VALUE_CONSUMER](/warning>|) -> - : * NEW: magic[VALUE_CONSUMER](>++|!) -> - : * NEW: magic[VALUE_CONSUMER](/error>|) -> -UnitIncDec() : UnitIncDec NEW: call(UnitIncDec(), ) -> - : * NEW: magic[UNRESOLVED_CALL]() -> -x< : * NEW: call(x<, |) -> +UnitIncDec() : UnitIncDec NEW: call(UnitIncDec(), ) -> + : * NEW: magic[UNRESOLVED_CALL]() -> +x< : * NEW: magic[UNRESOLVED_CALL](x<|) -> >++ !: * -x++ : * NEW: call(x++, |) -> -/error> : * NEW: magic[UNRESOLVED_CALL](/error>) -> -x++ : * NEW: call(x++, |) -> -/warning> : * NEW: magic[UNRESOLVED_CALL](/warning>) -> -x++ : UnitIncDec NEW: call(x++, |) -> -x = x++ !: * -{ var x = UnitIncDec() x = x++ } !: * COPY +x++ : * NEW: magic[UNRESOLVED_CALL](x++|, !) -> +/error> : * NEW: magic[UNRESOLVED_CALL](/error>) -> +x++ : * NEW: magic[UNRESOLVED_CALL](x++|, ) -> +/warning> : * NEW: magic[UNRESOLVED_CALL](/warning>) -> +x++ : UnitIncDec NEW: magic[UNRESOLVED_CALL](x++|, ) -> +x = x++ !: * +{ var x = UnitIncDec() x = x++ } !: * COPY ===================== diff --git a/compiler/testData/cfg/controlStructures/incorrectIndex_After.instructions b/compiler/testData/cfg/controlStructures/incorrectIndex_After.instructions index 97dbcd09ff1..09918847783 100644 --- a/compiler/testData/cfg/controlStructures/incorrectIndex_After.instructions +++ b/compiler/testData/cfg/controlStructures/incorrectIndex_After.instructions @@ -114,22 +114,20 @@ L6: jf(L8|) NEXT:[mark({ s.remove(it) }), mark({ s.add(it) })] 6 mark({ s.add(it) }) mark(s.add(it)) - r(s) -> - r(it) -> - magic[VALUE_CONSUMER](it|) -> + r(it) -> + r(s) -> mark(add(it)) - call(add(it), |) -> + magic[UNRESOLVED_CALL](add(it)|, !, ) -> 5 jmp(L9) NEXT:[merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> ] L8 [else branch]: 6 mark({ s.remove(it) }) PREV:[jf(L8|)] mark(s.remove(it)) - r(s) -> - r(it) -> - magic[VALUE_CONSUMER](it|) -> + r(it) -> + r(s) -> mark(remove(it)) - call(remove(it), |) -> + magic[UNRESOLVED_CALL](remove(it)|, !, ) -> L9 ['if' expression result]: - 5 merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> PREV:[jmp(L9), call(remove(it), |) -> ] + 5 merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> PREV:[jmp(L9), magic[UNRESOLVED_CALL](remove(it)|, !, ) -> ] r(true) -> L10 [start finally]: 6 mark({ name?.hashCode() }) diff --git a/compiler/testData/cfg/controlStructures/incorrectIndex_After.values b/compiler/testData/cfg/controlStructures/incorrectIndex_After.values index 138050ba676..7f03d63b12a 100644 --- a/compiler/testData/cfg/controlStructures/incorrectIndex_After.values +++ b/compiler/testData/cfg/controlStructures/incorrectIndex_After.values @@ -48,17 +48,17 @@ try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } re return true } --------------------- - : * NEW: magic[VALUE_CONSUMER](it|) -> - : * NEW: magic[VALUE_CONSUMER](it|) -> flag : Boolean NEW: r(flag) -> -s : * NEW: r(s) -> -it : * NEW: r(it) -> -add(it) : * NEW: call(add(it), |) -> +s : * NEW: r(s) -> +add !: * +it : * NEW: r(it) -> +add(it) : * NEW: magic[UNRESOLVED_CALL](add(it)|, !, ) -> s.add(it) : * COPY { s.add(it) } : * COPY -s : * NEW: r(s) -> -it : * NEW: r(it) -> -remove(it) : * NEW: call(remove(it), |) -> +s : * NEW: r(s) -> +remove !: * +it : * NEW: r(it) -> +remove(it) : * NEW: magic[UNRESOLVED_CALL](remove(it)|, !, ) -> s.remove(it) : * COPY { s.remove(it) } : * COPY if (flag) { s.add(it) } else { s.remove(it) } : * NEW: merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> diff --git a/compiler/testData/cfg/controlStructures/incorrectIndex_Before.instructions b/compiler/testData/cfg/controlStructures/incorrectIndex_Before.instructions index 6dc30cc30c5..84e588cef3b 100644 --- a/compiler/testData/cfg/controlStructures/incorrectIndex_Before.instructions +++ b/compiler/testData/cfg/controlStructures/incorrectIndex_Before.instructions @@ -114,22 +114,20 @@ L5: jf(L7|) NEXT:[mark({ s.remove(it) }), mark({ s.add(it) })] 6 mark({ s.add(it) }) mark(s.add(it)) - r(s) -> - r(it) -> - magic[VALUE_CONSUMER](it|) -> + r(it) -> + r(s) -> mark(add(it)) - call(add(it), |) -> + magic[UNRESOLVED_CALL](add(it)|, !, ) -> 5 jmp(L8) NEXT:[merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> ] L7 [else branch]: 6 mark({ s.remove(it) }) PREV:[jf(L7|)] mark(s.remove(it)) - r(s) -> - r(it) -> - magic[VALUE_CONSUMER](it|) -> + r(it) -> + r(s) -> mark(remove(it)) - call(remove(it), |) -> + magic[UNRESOLVED_CALL](remove(it)|, !, ) -> L8 ['if' expression result]: - 5 merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> PREV:[jmp(L8), call(remove(it), |) -> ] + 5 merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> PREV:[jmp(L8), magic[UNRESOLVED_CALL](remove(it)|, !, ) -> ] r(true) -> L9 [start finally]: 6 mark({ name?.hashCode() }) diff --git a/compiler/testData/cfg/controlStructures/incorrectIndex_Before.values b/compiler/testData/cfg/controlStructures/incorrectIndex_Before.values index 2f7eb655633..01c63a9646d 100644 --- a/compiler/testData/cfg/controlStructures/incorrectIndex_Before.values +++ b/compiler/testData/cfg/controlStructures/incorrectIndex_Before.values @@ -48,17 +48,17 @@ try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } re return true } --------------------- - : * NEW: magic[VALUE_CONSUMER](it|) -> - : * NEW: magic[VALUE_CONSUMER](it|) -> flag : Boolean NEW: r(flag) -> -s : * NEW: r(s) -> -it : * NEW: r(it) -> -add(it) : * NEW: call(add(it), |) -> +s : * NEW: r(s) -> +add !: * +it : * NEW: r(it) -> +add(it) : * NEW: magic[UNRESOLVED_CALL](add(it)|, !, ) -> s.add(it) : * COPY { s.add(it) } : * COPY -s : * NEW: r(s) -> -it : * NEW: r(it) -> -remove(it) : * NEW: call(remove(it), |) -> +s : * NEW: r(s) -> +remove !: * +it : * NEW: r(it) -> +remove(it) : * NEW: magic[UNRESOLVED_CALL](remove(it)|, !, ) -> s.remove(it) : * COPY { s.remove(it) } : * COPY if (flag) { s.add(it) } else { s.remove(it) } : * NEW: merge(if (flag) { s.add(it) } else { s.remove(it) }|, ) -> diff --git a/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.instructions b/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.instructions index 32436d6d65c..ddc0d08e2cf 100644 --- a/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.instructions +++ b/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.instructions @@ -119,8 +119,7 @@ L3 [after inlined declaration]: mark(println(y)) call(println(y), println|) -> magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> - mark(!DEBUG_INFO_SMARTCAST) - call(!DEBUG_INFO_SMARTCAST, |) -> + magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> 2 jmp(L7) L6 [else branch]: 3 mark({ println(y) x.length }) @@ -203,8 +202,7 @@ L4 [after inlined declaration]: mark(println(y)) call(println(y), println|) -> magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> - mark(!DEBUG_INFO_SMARTCAST) - call(!DEBUG_INFO_SMARTCAST, |) -> + magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> 2 jmp(L8) L7 [else branch]: 3 mark({ println(y) x.length }) diff --git a/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.values b/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.values index 35dcb7d6e1b..b1355e7dcd9 100644 --- a/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.values +++ b/compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.values @@ -70,7 +70,7 @@ callsAndInverts(x !is String) { y = 42 } y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> -!DEBUG_INFO_SMARTCAST : * NEW: call(!DEBUG_INFO_SMARTCAST, |) -> +!DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> { println(y) x.length } : * COPY y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> @@ -115,7 +115,7 @@ unknownBoolean && callsAndInverts(x !is String) { y = 42 } y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> -!DEBUG_INFO_SMARTCAST : * NEW: call(!DEBUG_INFO_SMARTCAST, |) -> +!DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> { println(y) x.length } : * COPY y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> diff --git a/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.instructions b/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.instructions index e39fb1546e3..b8fe86d884d 100644 --- a/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.instructions +++ b/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.instructions @@ -119,8 +119,7 @@ L3 [after inlined declaration]: mark(println(y)) call(println(y), println|) -> magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> - mark(!DEBUG_INFO_SMARTCAST) - call(!DEBUG_INFO_SMARTCAST, |) -> + magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> 2 jmp(L7) NEXT:[merge(if (callsAndInverts(x !is String) { y = 42 }) { println(y) x.length } else { println(y) x.length }|, ) -> ] L6 [else branch]: 3 mark({ println(y) x.length }) PREV:[jf(L6|)] @@ -203,8 +202,7 @@ L4 [after inlined declaration]: mark(println(y)) call(println(y), println|) -> magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> - mark(!DEBUG_INFO_SMARTCAST) - call(!DEBUG_INFO_SMARTCAST, |) -> + magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> 2 jmp(L8) NEXT:[merge(if (unknownBoolean && callsAndInverts(x !is String) { y = 42 }) { println(y) x.length } else { println(y) x.length }|, ) -> ] L7 [else branch]: 3 mark({ println(y) x.length }) PREV:[jf(L7|)] diff --git a/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.values b/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.values index 35dcb7d6e1b..b1355e7dcd9 100644 --- a/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.values +++ b/compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.values @@ -70,7 +70,7 @@ callsAndInverts(x !is String) { y = 42 } y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> -!DEBUG_INFO_SMARTCAST : * NEW: call(!DEBUG_INFO_SMARTCAST, |) -> +!DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> { println(y) x.length } : * COPY y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> @@ -115,7 +115,7 @@ unknownBoolean && callsAndInverts(x !is String) { y = 42 } y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](DEBUG_INFO_SMARTCAST) -> -!DEBUG_INFO_SMARTCAST : * NEW: call(!DEBUG_INFO_SMARTCAST, |) -> +!DEBUG_INFO_SMARTCAST : * NEW: magic[UNRESOLVED_CALL](!DEBUG_INFO_SMARTCAST|) -> { println(y) x.length } : * COPY y : Int NEW: r(y) -> println(y) : * NEW: call(println(y), println|) -> diff --git a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt index 2bce3143a50..e2cc8a96d80 100644 --- a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt +++ b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt @@ -4,7 +4,7 @@ fun text() { "direct:a" on {it.body == ""} to "mock:a" "direct:a" on {it -> it.body == ""} to "mock:a" bar {1} - bar {it + 1} + bar {it + 1} bar {it, it1 -> it} bar1 {1} diff --git a/compiler/testData/diagnostics/tests/CharacterLiterals.kt b/compiler/testData/diagnostics/tests/CharacterLiterals.kt index b2e07c99188..53c03f47311 100644 --- a/compiler/testData/diagnostics/tests/CharacterLiterals.kt +++ b/compiler/testData/diagnostics/tests/CharacterLiterals.kt @@ -6,8 +6,8 @@ fun test(c : Char) { test(' test(0' test('\n') - test('\\') - test('''') + test('\\') + test('''') test('\'') test('\"') } diff --git a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt index fffe1dd919d..e3decfd56d6 100644 --- a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt +++ b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt @@ -1,6 +1,6 @@ // !WITH_NEW_INFERENCE fun test() { - if (x > 0) { + if (x > 0) { } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/DeferredTypes.kt b/compiler/testData/diagnostics/tests/DeferredTypes.kt index dca15132c23..a5594b4d9c3 100644 --- a/compiler/testData/diagnostics/tests/DeferredTypes.kt +++ b/compiler/testData/diagnostics/tests/DeferredTypes.kt @@ -1,5 +1,5 @@ // NI_EXPECTED_FILE interface T { - val a = Foo.bar() + val a = Foo.bar() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt index c979d34fa4c..c39ee97049a 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt +++ b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt @@ -16,7 +16,7 @@ operator fun String.unaryPlus(): Int = 0 fun test() { requireInt(+ "") requireInt(+ Example()) - requireString(+ ExampleDeprecated()) + requireString(+ ExampleDeprecated()) } fun requireInt(n: Int) {} @@ -27,7 +27,7 @@ class Example2 { operator fun minus() = this fun test() { - +this + +this -this } } diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt index 39173da547c..d08dc66e872 100644 --- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt +++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt @@ -26,13 +26,13 @@ fun fooT2() : (t : T) -> T { fun main(args : Array) { args.foo()() args.foo1()() - a.foo1()() - a.foo1()(a) + a.foo1()() + a.foo1()(a) args.foo1()(1) args.foo1()("1") - a.foo1()("1") - a.foo1()(a) + a.foo1()("1") + a.foo1()(a) foo2()({}) foo2(){} diff --git a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt index 408a6caef2d..f08830b3e13 100644 --- a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt +++ b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt @@ -14,6 +14,6 @@ class B { } class C { - val bar = test() + val bar = test() val test = bar() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/LValueAssignment.kt b/compiler/testData/diagnostics/tests/LValueAssignment.kt index f0d3683c545..30b9d9a4ecf 100644 --- a/compiler/testData/diagnostics/tests/LValueAssignment.kt +++ b/compiler/testData/diagnostics/tests/LValueAssignment.kt @@ -93,7 +93,7 @@ class Test() { fun testIncompleteSyntax() { val s = "s" - ++s. + ++s. } fun testVariables() { diff --git a/compiler/testData/diagnostics/tests/PackageQualified.kt b/compiler/testData/diagnostics/tests/PackageQualified.kt index a0f38399b6b..2d6b1e583f4 100644 --- a/compiler/testData/diagnostics/tests/PackageQualified.kt +++ b/compiler/testData/diagnostics/tests/PackageQualified.kt @@ -25,7 +25,7 @@ package foobar.a // FILE: b.kt package foobar -val x1 = a.a +val x1 = a.a val x2 = foobar.a.a val y1 = foobar.a.b diff --git a/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt b/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt index 3c79f703665..e2b3c86b5ec 100644 --- a/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt +++ b/compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt @@ -34,7 +34,7 @@ annotation class Ann8(val p1: Array, val p4: Array) annotation class Ann9( - val error: Unresolved = Unresolved.VALUE + val error: Unresolved = Unresolved.VALUE ) diff --git a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt index f7ad5897fce..ae80d67f369 100644 --- a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt +++ b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt @@ -28,7 +28,7 @@ abstract class My(@Field arg: Int, @Field val w: I fun foo() {} @Field - val v: Int by Delegates.lazy { 42 } + val v: Int by Delegates.lazy { 42 } } enum class Your { diff --git a/compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt b/compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt index 49bbc029531..d9293696fa8 100644 --- a/compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt +++ b/compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt @@ -15,6 +15,6 @@ data class User(val surname: String) fun foo() { bar { - User::surname + User::surname } } diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt index 480bac1c3df..f75b4b68bcf 100644 --- a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt +++ b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt @@ -16,7 +16,7 @@ fun test1() { bar("", 1, ::foo).checkType { _>() } bar("", 1, ::fooReturnInt).checkType { _>() } bar("", 1, ::fooTakeString).checkType { _>() } - bar("", "", ::fooReturnInt).checkType { _>() } + bar("", "", ::fooReturnInt).checkType { _>() } val x: String = bar("", "", ::fooReturnInt) diff --git a/compiler/testData/diagnostics/tests/checkType.kt b/compiler/testData/diagnostics/tests/checkType.kt index 981487c2cba..2c67dda4e97 100644 --- a/compiler/testData/diagnostics/tests/checkType.kt +++ b/compiler/testData/diagnostics/tests/checkType.kt @@ -7,6 +7,6 @@ interface C : B fun test(b: B) { b checkType { _() } - b checkType { _() } - b checkType { _() } + b checkType { _() } + b checkType { _() } } diff --git a/compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt b/compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt index 395850c149d..87c2af2e4a9 100644 --- a/compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt +++ b/compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt @@ -15,7 +15,7 @@ val n1 = A.Nested::class val n2 = A.Nested<*>::class val i1 = A.Inner::class -val i2 = A<*>.Inner<*>::class +val i2 = A<*>.Inner<*>::class val i3 = A.Inner::class val m1 = Map::class diff --git a/compiler/testData/diagnostics/tests/classLiteral/genericClasses.txt b/compiler/testData/diagnostics/tests/classLiteral/genericClasses.txt index 16d9c61c27e..6ac3aaacbce 100644 --- a/compiler/testData/diagnostics/tests/classLiteral/genericClasses.txt +++ b/compiler/testData/diagnostics/tests/classLiteral/genericClasses.txt @@ -7,7 +7,7 @@ public val a4: kotlin.reflect.KClass> public val b1: kotlin.reflect.KClass public val b2: kotlin.reflect.KClass public val i1: kotlin.reflect.KClass.Inner<*>> -public val i2: kotlin.reflect.KClass.Inner<*>> +public val i2: [ERROR : Unresolved class] public val i3: kotlin.reflect.KClass.Inner> public val m1: kotlin.reflect.KClass> public val m2: kotlin.reflect.KClass> diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt index 4051a3af6a8..13235a7274d 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt @@ -43,7 +43,7 @@ fun f() { A.Obj A.Companion.Obj2 A.Obj2 - A.Obj2.c + A.Obj2.c A.Nested2 O.O diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_after.kt b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_after.kt index e5156b5429c..0bcac8c5aef 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_after.kt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_after.kt @@ -38,7 +38,7 @@ fun f() { C.E2.B() C.E2.O - C.E3.O.InO + C.E3.O.InO C.O C.O.InO diff --git a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_before.kt b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_before.kt index f1510ed050a..157de91ee8a 100644 --- a/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_before.kt +++ b/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_before.kt @@ -38,7 +38,7 @@ fun f() { C.E2.B() C.E2.O - C.E3.O.InO + C.E3.O.InO C.O C.O.InO diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt index e00cdf7503b..4bb7359054c 100644 --- a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt +++ b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt @@ -20,5 +20,5 @@ fun check() { val f: IntArray = [1] [f] checkType { _>() } - [1, ""] checkType { _>() } + [1, ""] checkType { _>() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt index 3d677a29bca..c0540ede71d 100644 --- a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt +++ b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt @@ -6,7 +6,7 @@ fun test(): Array { foo([""]) - val p = [1, 2] + [3, 4] + val p = [1, 2] + [3, 4] return [1, 2] } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt index c6e6e7f82db..bee0f36395b 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt @@ -47,7 +47,7 @@ class R { fun test() { val o = object { fun run() { - p.x = 43 + p.x = 43 } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt b/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt index 2ed8fb1d329..61b56f1dee4 100644 --- a/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt +++ b/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt @@ -13,9 +13,9 @@ fun exclExcl(t: T?): T = t!! fun test11() { // not 'String!' exclExcl(A.foo()) checkType { _() } - exclExcl(A.foo()) checkType { _() } + exclExcl(A.foo()) checkType { _() } // not 'String!' A.foo()!! checkType { _() } - A.foo()!! checkType { _() } + A.foo()!! checkType { _() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt b/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt index f5bd8be4fda..73f40f6d67d 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt +++ b/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt @@ -9,7 +9,7 @@ fun foo(): Int { val d: Data? = null // An error must be here val (x, y) = d - return x + y + return x + y } data class NormalData(val x: T, val y: T) @@ -18,5 +18,5 @@ fun bar(): Int { val d: NormalData? = null // An error must be here val (x, y) = d - return x + y + return x + y } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt index 5927f432a0c..b6f86b26639 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt @@ -12,8 +12,8 @@ class A(outer: Outer) { 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 e: String by + foo(getMyProperty()) + var f: String by foo(getMyProperty()) - 1 } fun foo(a: Any?) = MyProperty() diff --git a/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt b/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt index 852a7c91dba..17a55c71aec 100644 --- a/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt +++ b/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt @@ -2,6 +2,6 @@ enum class E : Cloneable { A; override fun clone(): Any { - return super.clone() + return super.clone() } } diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.kt b/compiler/testData/diagnostics/tests/extensions/classObject.kt index 16cce36e018..59081a07c2b 100644 --- a/compiler/testData/diagnostics/tests/extensions/classObject.kt +++ b/compiler/testData/diagnostics/tests/extensions/classObject.kt @@ -15,6 +15,6 @@ fun test() { A.f2() B.f3() B.f4() - A.f5() - B.f5() + A.f5() + B.f5() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/kt3563.kt b/compiler/testData/diagnostics/tests/extensions/kt3563.kt index e1c517496d2..ff7ec890495 100644 --- a/compiler/testData/diagnostics/tests/extensions/kt3563.kt +++ b/compiler/testData/diagnostics/tests/extensions/kt3563.kt @@ -10,7 +10,7 @@ class Customer(name1: String) fun foo(f: File, c: Customer) { f.name1 - c.name1 // name1 should be unresolved here + c.name1 // name1 should be unresolved here } val File.name1: String diff --git a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt index f6aae337302..d8b20080c1d 100644 --- a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt +++ b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt @@ -7,28 +7,28 @@ package bar fun List.a() {} fun test1(i: Int?) { - 1.a() - i.a() + 1.a() + i.a() } fun test2(c: Collection) { - c.a() + c.a() } fun Int.foo() {} fun test3(s: String?) { - "".foo() - s.foo() - "".foo(1) - s.foo("a") + "".foo() + s.foo() + "".foo(1) + s.foo("a") } interface A fun T.c() {} fun test4() { - 1.c() + 1.c() } @@ -41,16 +41,16 @@ fun test5() { fun R?.sure() : R = this!! fun test6(l: List?) { - l.sure<T>() + l.sure<T>() } fun List.b() {} fun test7(l: List) { - l.b() + l.b() } fun test8(l: List?) { - l.b() + l.b() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt index 79868e08a13..ed920c74b81 100644 --- a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt +++ b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt @@ -6,7 +6,7 @@ class A {} fun test(a1: A, a2: A) { val range = "island".."isle" - a1..a2 + a1..a2 } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt index 7c1ba5de89a..80f29ecddf8 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt @@ -32,8 +32,8 @@ fun bar(aInstance: A, bInstance: B) { foo(bInstance) { (a, b), (c, d) -> - a checkType { _() } - b checkType { _() } + a checkType { _() } + b checkType { _() } c checkType { _() } d checkType { _() } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt index 5a6af434204..0a571abc9d0 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt @@ -28,7 +28,7 @@ fun bar(aList: List) { } aList.foo { (a, b): B -> - b checkType { _() } - a checkType { _() } + b checkType { _() } + a checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt index fe723635302..f4b19e76869 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt @@ -26,7 +26,7 @@ fun bar() { y2 checkType { _<(A) -> Unit>() } val z = { (a: Int, b: String) -> - a checkType { _() } - b checkType { _() } + a checkType { _() } + b checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt index cbefe771655..3c6b2355a3b 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt @@ -8,23 +8,23 @@ fun foo(block: (A, B) -> Unit) { } fun bar() { foo { (a, a), b -> - a checkType { _() } - b checkType { _() } + a checkType { _() } + b checkType { _() } } foo { (a, b), a -> - a checkType { _() } + a checkType { _() } b checkType { _() } } foo { a, (a, b) -> - a checkType { _() } - b checkType { _() } + a checkType { _() } + b checkType { _() } } foo { (a, b), (c, b) -> a checkType { _() } - b checkType { _() } - c checkType { _() } + b checkType { _() } + c checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt index a81c28ab87f..8178d868850 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt @@ -8,35 +8,35 @@ fun foo(block: (A) -> Unit) { } fun bar() { foo { (_, b) -> - _.hashCode() + _.hashCode() b checkType { _() } } foo { (a, _) -> a checkType { _() } - _.hashCode() + _.hashCode() } foo { (_, _) -> - _.hashCode() + _.hashCode() } foo { (_: Int, b: String) -> - _.hashCode() + _.hashCode() b checkType { _() } } foo { (a: Int, _: String) -> a checkType { _() } - _.hashCode() + _.hashCode() } foo { (_: Int, _: String) -> - _.hashCode() + _.hashCode() } foo { (_, _): A -> - _.hashCode() + _.hashCode() } foo { (`_`, _) -> @@ -52,12 +52,12 @@ fun bar() { } foo { (_: String, b) -> - _.hashCode() + _.hashCode() b checkType { _() } } foo { (_, b): B -> - _.hashCode() + _.hashCode() b checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt b/compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt index afcb91126c0..036724b737c 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt @@ -5,31 +5,31 @@ fun foobar(block: (Double) -> Unit) { } fun bar() { foo { _, b -> - _.hashCode() + _.hashCode() b checkType { _() } } foo { a, _ -> a checkType { _() } - _.hashCode() + _.hashCode() } foo { _, _ -> - _.hashCode() + _.hashCode() } foo { _: Int, b: String -> - _.hashCode() + _.hashCode() b checkType { _() } } foo { a: Int, _: String -> a checkType { _() } - _.hashCode() + _.hashCode() } foo { _: Int, _: String -> - _.hashCode() + _.hashCode() } foo { `_`, _ -> diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt index ba8304bdef5..ed2212cf62a 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt @@ -33,5 +33,5 @@ fun foo() { val csIt: Iterator = A().iterator() - commonSupertype(A().iterator(), A().iterator()).checkType { _.MyIt>() } + commonSupertype(A().iterator(), A().iterator()).checkType { _.MyIt>() } } diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt index 9dab49456cb..c8b9fbeb0b9 100644 --- a/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt +++ b/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt @@ -6,7 +6,7 @@ class Outer { inner class Inner fun foo(x: Outer.Inner, y: Outer.Inner, z: Inner) { var inner = Inner() - x.checkType { _() } + x.checkType { _() } x.checkType { _.Inner>() } z.checkType { _() } z.checkType { _.Inner>() } diff --git a/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt b/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt index 3e52e91e150..f124e241dab 100644 --- a/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt +++ b/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt @@ -15,5 +15,5 @@ fun test(a: T) where T : B, T : C { a.foo = "" a.foo = null - a.foo.checkType { _() } + a.foo.checkType { _() } } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt index 6332cbb4b9c..ca4983c085b 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt @@ -8,11 +8,11 @@ class Out fun test(x: A, y: Out) { with(x) { // TODO: this diagnostic could be replaced with TYPE_MISMATCH_DUE_TO_TYPE_PROJECTION - "".foo() - y.bar() + "".foo() + y.bar() with(y) { - bar() + bar() } } } diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt index 120b6e464be..685b6e464ec 100644 --- a/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt +++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt @@ -10,10 +10,10 @@ public class Clazz { // FILE: main.kt fun test(clazz: Clazz<*>) { clazz.t checkType { _() } - clazz.getSuperClass() checkType { _?>() } + clazz.getSuperClass() checkType { _?>() } clazz.getSuperClass().t checkType { _() } - clazz.superClass checkType { _?>() } + clazz.superClass checkType { _?>() } clazz.superClass.t checkType { _() } // See KT-9294 diff --git a/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt b/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt index 3995f1a3d6a..4d71e4b4e5f 100644 --- a/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt +++ b/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt @@ -71,6 +71,6 @@ fun test(b: B) { val b_3 = B() b_3.m2() - val b_4 = a.B() - b_4.m2() + val b_4 = a.B() + b_4.m2() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/imports/Imports.kt b/compiler/testData/diagnostics/tests/imports/Imports.kt index 7eebbd7e862..3c311aaa7e1 100644 --- a/compiler/testData/diagnostics/tests/imports/Imports.kt +++ b/compiler/testData/diagnostics/tests/imports/Imports.kt @@ -82,7 +82,7 @@ object C { } fun foo() { - if (i == 3) f() + if (i == 3) f() } //FILE:d.kt diff --git a/compiler/testData/diagnostics/tests/imports/twoImportLists.kt b/compiler/testData/diagnostics/tests/imports/twoImportLists.kt index 0ffb4c6c457..beb036785ad 100644 --- a/compiler/testData/diagnostics/tests/imports/twoImportLists.kt +++ b/compiler/testData/diagnostics/tests/imports/twoImportLists.kt @@ -85,7 +85,7 @@ object C { } fun foo() { - if (i == 3) f() + if (i == 3) f() } //FILE:d.kt diff --git a/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt b/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt index 8bda41d1e59..507dcafdfd7 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt @@ -3,7 +3,7 @@ package a fun foo() { val a = getErrorType() - if (a == null) { //no senseless comparison + if (a == null) { //no senseless comparison } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt b/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt index 7f21b25d13d..d0a850944a2 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt @@ -3,18 +3,18 @@ fun test1() { if (rr) { if (l) { - a.q() + a.q() } else { - a.w() + a.w() } } else { if (n) { - a.t() + a.t() } else { - a.u() + a.u() } } } diff --git a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt index 046140690d5..1f872430702 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt @@ -4,5 +4,5 @@ package bar fun main() { class Some - Some[] names = ["ads"] + Some[] names = ["ads"] } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt b/compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt index d65fdddf436..34f7d17441e 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt @@ -1,5 +1,5 @@ //KT-4866 Resolve does not work inside brackets with unresolved reference before fun test(i: Int, j: Int) { - foo[i, j] + foo[i, j] } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt b/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt index 03ecf31d505..105c52570db 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt @@ -7,5 +7,5 @@ class MyClass1 { } fun main(arg: MyClass1) { - arg+ + arg+ } diff --git a/compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt b/compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt index 5b6fceb8f4d..33b9a0c3244 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt @@ -1,4 +1,4 @@ fun foo(a: Int) { - !bbb - bbb + a + !bbb + bbb + a } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt index 87da35a3390..9d789bbac19 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt @@ -7,7 +7,7 @@ fun bar(a: Array): Array = null!! fun test1(a: Array) { val r: Array = bar(a) val t = bar(a) - t checkType { _>() } + t checkType { _>() } } fun foo(l: Array): Array> = null!! @@ -15,5 +15,5 @@ fun foo(l: Array): Array> = null!! fun test2(a: Array) { val r: Array> = foo(a) val t = foo(a) - t checkType { _>>() } + t checkType { _>>() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt index e2e7f65b476..798a873c6ce 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt @@ -4,11 +4,11 @@ fun Array.filterNotNull(): List = throw Exception() fun test1(a: Array) { - val list = a.filterNotNull() - list checkType { _>() } + val list = a.filterNotNull() + list checkType { _>() } } fun test2(vararg a: Int?) { - val list = a.filterNotNull() - list checkType { _>() } + val list = a.filterNotNull() + list checkType { _>() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt index c910b9956a2..c76464333f8 100644 --- a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt +++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt @@ -3,5 +3,5 @@ fun Array.foo() {} fun test(array: Array) { array.foo() - array.foo<out Int>() + array.foo<out Int>() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt index fe277112039..d74ac39652f 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt @@ -7,7 +7,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 \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt index e693f4265b7..1745e3d04a5 100644 --- a/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt +++ b/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt @@ -9,10 +9,10 @@ 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 receiverParenthesized = (foo()).fooA() as A +val no2A = A().fooA().fooA() as A val correct1 = A().fooA() as A val correct2 = foo().fooA() as A diff --git a/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.kt b/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.kt index 4f2a8dd8a9d..1aefa65531d 100644 --- a/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.kt +++ b/compiler/testData/diagnostics/tests/inference/nonFunctionalExpectedTypeForLambdaArgument.kt @@ -15,7 +15,7 @@ fun testAny() { fun testAnyCall() { callAny { - error -> error() + error -> error() } } @@ -27,7 +27,7 @@ fun testParam() { fun testParamCall() { callParam { - param -> param() + param -> param() } } diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt index e4352e4ac4b..65b80fa267d 100644 --- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt +++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt @@ -3,7 +3,7 @@ fun foo() { fun fact(n: Int) = { if (n > 0) { - fact(n - 1) * n + fact(n - 1) * n } else { 1 diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt index cb201d14604..aff7a34c740 100644 --- a/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt @@ -10,4 +10,4 @@ fun List.map1(f: (T)-> Q): List? = tail!!.map1(f) fun List.map2(f: (T)-> Q): List? = tail.sure().map2(f) -fun List.map3(f: (T)-> Q): List? = tail.sure<T>().map3(f) \ No newline at end of file +fun List.map3(f: (T)-> Q): List? = tail.sure<T>().map3(f) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt index 4dad10ffaa8..1bc71031708 100644 --- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt +++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt @@ -11,7 +11,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} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/tooEagerSmartcast.kt b/compiler/testData/diagnostics/tests/inference/tooEagerSmartcast.kt index 36cf744239c..7a24f5ee640 100644 --- a/compiler/testData/diagnostics/tests/inference/tooEagerSmartcast.kt +++ b/compiler/testData/diagnostics/tests/inference/tooEagerSmartcast.kt @@ -36,7 +36,7 @@ fun Number.num() {} fun main(b: Base) { b.foo().num() if (b is Derived<*>) { - b.foo().num() + b.foo().num() b.baz().length } } diff --git a/compiler/testData/diagnostics/tests/infos/SmartCasts.kt b/compiler/testData/diagnostics/tests/infos/SmartCasts.kt index f410f1e4479..18931e68fe4 100644 --- a/compiler/testData/diagnostics/tests/infos/SmartCasts.kt +++ b/compiler/testData/diagnostics/tests/infos/SmartCasts.kt @@ -89,17 +89,17 @@ fun f13(a : A?) { } else { a?.foo() - c.bar() + c.bar() } a?.foo() if (!(a is B)) { a?.foo() - c.bar() + c.bar() } else { a.foo() - c.bar() + c.bar() } a?.foo() @@ -109,7 +109,7 @@ fun f13(a : A?) { } else { a?.foo() - c.bar() + c.bar() } if (!(a is B) || !(a is C)) { @@ -202,7 +202,7 @@ fun mergeSmartCasts(a: Any?) { val i: Int = a.compareTo("") } if (a is String && a.compareTo("") == 0) {} - if (a is String || a.compareTo("") == 0) {} + if (a is String || a.compareTo("") == 0) {} } //mutability diff --git a/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt b/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt index 157e61f6ec0..2f9307596eb 100644 --- a/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt +++ b/compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt @@ -1,6 +1,6 @@ inline fun foo() { - unresolved().another - unresolved().another() + unresolved().another + unresolved().another() } fun main() { diff --git a/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt b/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt index 8bfaab8ddbe..4d38f0523c5 100644 --- a/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt +++ b/compiler/testData/diagnostics/tests/inner/innerThisSuper.kt @@ -6,12 +6,12 @@ interface Trait { class Outer : Trait { class Nested { - val t = this@Outer.bar() - val s = super@Outer.bar() + val t = this@Outer.bar() + val s = super@Outer.bar() inner class NestedInner { - val t = this@Outer.bar() - val s = super@Outer.bar() + val t = this@Outer.bar() + val s = super@Outer.bar() } } diff --git a/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt b/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt index 77c20ac8e9a..e5cca4fc742 100644 --- a/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt +++ b/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt @@ -7,8 +7,8 @@ class Outer { class Nested { fun f() = function() fun g() = property - fun h() = this@Outer.function() - fun i() = this@Outer.property + fun h() = this@Outer.function() + fun i() = this@Outer.property } inner class Inner { diff --git a/compiler/testData/diagnostics/tests/j+k/differentFilename.kt b/compiler/testData/diagnostics/tests/j+k/differentFilename.kt index c42a86022bf..9b712e67acd 100644 --- a/compiler/testData/diagnostics/tests/j+k/differentFilename.kt +++ b/compiler/testData/diagnostics/tests/j+k/differentFilename.kt @@ -22,5 +22,5 @@ fun main(x: A) { x.b().bar() x.f().foobaz() - D().baz() + D().baz() } diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt index 8bd405a4029..8d821cfe4d5 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt @@ -9,7 +9,7 @@ public class A { // FILE: main.kt fun test(x: List, y: List) { - A("", x) checkType { _>() } + A("", x) checkType { _>() } A("", y) checkType { _>() } A("", x) diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt index 7fc6b3e77da..9a3c304ef35 100644 --- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt +++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt @@ -13,6 +13,6 @@ fun test(x: List, y: List) { Outer().Inner("", y, 1) checkType { _.Inner>() } Outer().Inner("", y, 1) checkType { _.Inner>() } - Outer().Inner("", x, 1) checkType { _.Inner>() } + Outer().Inner("", x, 1) checkType { _.Inner>() } Outer().Inner("", x, 1) } diff --git a/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.kt b/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.kt index fe6cf5066ec..c35ba9efdde 100644 --- a/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.kt +++ b/compiler/testData/diagnostics/tests/j+k/properties/fieldPropertyOverloadsDisabled.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/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt b/compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt index 77a689df03a..77377b92e2e 100644 --- a/compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt +++ b/compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt @@ -40,7 +40,7 @@ import p2.* import p3.* fun test(a: A) { - a.v1 - a.v2 - a.v3 + a.v1 + a.v2 + a.v3 } diff --git a/compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt b/compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt index ea81d365db7..0a48c3585d5 100644 --- a/compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt +++ b/compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt @@ -41,7 +41,7 @@ import p2.* import p3.* fun test(a: A) { - a.v1 - a.v2 - a.v3 + a.v1 + a.v2 + a.v3 } diff --git a/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt b/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt index aaf5f15469e..f7645e90124 100644 --- a/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt +++ b/compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt @@ -22,6 +22,6 @@ fun test() { bar(1, z = "", y = 2) bar(z = "", 1) bar(1, zz = "", - zz.foo + zz.foo ) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt index 2345cc10d42..79588610cd3 100644 --- a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt +++ b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt @@ -32,7 +32,7 @@ fun test() { otherGeneric(1) val r = either(1, "") - r checkType { _() } + r checkType { _() } use(a, b, c, d, e, f, g, r) } @@ -57,7 +57,7 @@ fun lowerBound(t: T, l : Cov): T = throw Exception("$t $l") fun testLowerBound(cov: Cov, covN: Cov) { val r = lowerBound(1, cov) - r checkType { _() } + r checkType { _() } val n = lowerBound(1, covN) n checkType { _() } diff --git a/compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt b/compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt index 03f875e7bf2..18caa05cff8 100644 --- a/compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt +++ b/compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt @@ -22,4 +22,4 @@ fun test() { B.foo() } -val bb = B.foo() \ No newline at end of file +val bb = B.foo() \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/objects/ObjectsNested.kt b/compiler/testData/diagnostics/tests/objects/ObjectsNested.kt index 36e785837f6..35bd7aed335 100644 --- a/compiler/testData/diagnostics/tests/objects/ObjectsNested.kt +++ b/compiler/testData/diagnostics/tests/objects/ObjectsNested.kt @@ -26,4 +26,4 @@ val a = A val b = B val c = A.B val d = A.B.A -val e = B.A.B \ No newline at end of file +val e = B.A.B \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt index 0f9024d6b6f..8ca2e1cec73 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt @@ -30,7 +30,7 @@ fun test() { oldAndNew %= 1 val onlyOld = OnlyOld() - onlyOld %= 1 + onlyOld %= 1 val onlyNew = OnlyNew() onlyNew %= 1 diff --git a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt index f1d3d0d89af..8ec787522ff 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt @@ -27,7 +27,7 @@ class IntAndUnit { fun test() { OldAndNew() % 1 - OnlyOld() % 1 + OnlyOld() % 1 OnlyNew() % 1 Sample() % 1 diff --git a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt index 2f120bfaa69..a644c9bebd7 100644 --- a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt +++ b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt @@ -10,5 +10,5 @@ object RemExtension operator fun RemExtension.rem(x: Int) {} fun foo() { - OldMod % 123 + OldMod % 123 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt b/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt index 5530b81fb4b..8d520ab13ed 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt @@ -23,5 +23,5 @@ fun out(t: T): Out> = null!! fun test(a: Out, b: Out>) { val v = f(a, b, out(J.j())) v checkType { _>() } - v checkType { _>() } + v checkType { _>() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt index 3a0ed4efc32..e2f0005dddc 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt @@ -61,7 +61,7 @@ fun test() { takeNotNull(J.getNAny() ?: J()) val x = unresolved ?: null - val y = unresolved.foo ?: return + val y = unresolved.foo ?: return } fun takeNotNull(s: J) {} diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt index bdcd95cfc6d..c68f85c30e6 100644 --- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt +++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt @@ -19,5 +19,5 @@ class C(p: Any, val v: Any) { var test5 get() { return p } - set(nv) { p.let {} } + set(nv) { p.let {} } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt b/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt index 31bea1ed20a..da1ae67a9fc 100644 --- a/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt +++ b/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt @@ -1,2 +1,2 @@ // !WITH_NEW_INFERENCE -val unwrapped = some<sdf()()Any>::unwrap \ No newline at end of file +val unwrapped = some<sdf()()Any>::unwrap \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt b/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt index c8c78926ca4..f7f31abccbc 100644 --- a/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt +++ b/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt @@ -1,4 +1,4 @@ // !WITH_NEW_INFERENCE // NI_EXPECTED_FILE -val unwrapped = some.<cabc$WrapperAny>::unwrap \ No newline at end of file +val unwrapped = some.<cabc$WrapperAny>::unwrap \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt b/compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt index 9d116812ff2..eb37cdc19d9 100644 --- a/compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt +++ b/compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt @@ -23,12 +23,12 @@ package other class a {} fun test(a_: a.b) { - a_.a_b() + a_.a_b() val a_2 = a.b() - a_2.a_b() - a_2.some_ab() - a_2.a_() + a_2.a_b() + a_2.some_ab() + a_2.a_() } // FILE: c2.kt diff --git a/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt b/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt index 0d9a2300de3..864b2e324e2 100644 --- a/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt +++ b/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt @@ -8,9 +8,9 @@ fun composite() { } fun html() { - <html></html> + <html></html> } fun html1() { - <html></html>html + <html></html>html } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/regressions/Jet81.kt b/compiler/testData/diagnostics/tests/regressions/Jet81.kt index 6e2635c377d..e3965aeeb8c 100644 --- a/compiler/testData/diagnostics/tests/regressions/Jet81.kt +++ b/compiler/testData/diagnostics/tests/regressions/Jet81.kt @@ -18,7 +18,7 @@ object A { class Test2 { private val a = object { init { - b + 1 + b + 1 } val x = b val y = 1 diff --git a/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt b/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt index db6a738d76d..b58e1883c7f 100644 --- a/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt +++ b/compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt @@ -4,10 +4,10 @@ interface Iterator { fun map(transform: (element: T) -> R) : Iterator = object : Iterator { - override fun next() : R = transform(this@map.next()) + override fun next() : R = transform(this@map.next()) override val hasNext : Boolean // There's no 'this' associated with the map() function, only this of the Iterator class - get() = this@map.hasNext + get() = this@map.hasNext } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/regressions/kt10243.kt b/compiler/testData/diagnostics/tests/regressions/kt10243.kt index 6ab2a6061de..31914ce925a 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt10243.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt10243.kt @@ -4,9 +4,9 @@ private fun doUpdateRegularTasks() { try { while (f) { val xmlText = getText() - if (xmlText == null) {} + if (xmlText == null) {} else { - xmlText.value = 0 // !!! + xmlText.value = 0 // !!! } } diff --git a/compiler/testData/diagnostics/tests/regressions/kt10843.kt b/compiler/testData/diagnostics/tests/regressions/kt10843.kt index 66e4fbd0bf7..c8960bd58fb 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt10843.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt10843.kt @@ -1,8 +1,8 @@ // !WITH_NEW_INFERENCE // NI_EXPECTED_FILE // See EA-76890 / KT-10843: NPE during analysis -fun lambda(x : Int?) = x?.let l { +fun lambda(x : Int?) = x?.let l { y -> - if (y > 0) return@l x + if (y > 0) return@l x y }!! diff --git a/compiler/testData/diagnostics/tests/regressions/kt12898.kt b/compiler/testData/diagnostics/tests/regressions/kt12898.kt index 72f52c800ee..e573d011812 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt12898.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt12898.kt @@ -8,9 +8,9 @@ interface B { class C(override val t: Any?) : B fun f(b: B<*, Any>) { - val y = b.t + val y = b.t if (y is String?) { - y.length + y.length } } diff --git a/compiler/testData/diagnostics/tests/regressions/kt13685.kt b/compiler/testData/diagnostics/tests/regressions/kt13685.kt index 3e161815ad4..72760fb5919 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt13685.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt13685.kt @@ -3,5 +3,5 @@ fun foo() { val text: List = null!! - text.map Any?::toString + text.map Any?::toString } diff --git a/compiler/testData/diagnostics/tests/regressions/kt30245.kt b/compiler/testData/diagnostics/tests/regressions/kt30245.kt index 4eaa2e67876..6fa6187ce16 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt30245.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt30245.kt @@ -78,8 +78,8 @@ fun test2() { // to extension lambda 1 // val w27 = W2 { i, s: String -> i + s.length } // overload oi- ni- // val i27: E1 = id { i, s: String -> i + s.length } // overload oi- ni- - val w28 = W2 { i: Int, s -> i + s.length } // oi- ni- - val i28: E1 = id { i: Int, s -> i + s.length } // oi- ni- + val w28 = W2 { i: Int, s -> i + s.length } // oi- ni- + val i28: E1 = id { i: Int, s -> i + s.length } // oi- ni- val w29 = W2 { i: Int, s: String -> i + s.length } // oi- ni- val i29: E1 = id { i: Int, s: String -> i + s.length } // oi+ ni+ diff --git a/compiler/testData/diagnostics/tests/regressions/kt31975.kt b/compiler/testData/diagnostics/tests/regressions/kt31975.kt index 1b59ff233d1..f38ee5a008c 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt31975.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt31975.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/regressions/kt5362.kt b/compiler/testData/diagnostics/tests/regressions/kt5362.kt index 087b3f8ca2e..34fbca34c61 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt5362.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt5362.kt @@ -12,7 +12,7 @@ class Outer { fun Activity.toast() = Unit class Activity(){ class Fragment{ - fun call() = toast() + fun call() = toast() } } diff --git a/compiler/testData/diagnostics/tests/regressions/kt557.kt b/compiler/testData/diagnostics/tests/regressions/kt557.kt index b36e017f0da..fcfcb202f2a 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt557.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt557.kt @@ -8,5 +8,5 @@ fun Array.length() : Int { } fun test(array : Array?) { - array?.sure>().length() + array?.sure>().length() } diff --git a/compiler/testData/diagnostics/tests/regressions/kt9384.kt b/compiler/testData/diagnostics/tests/regressions/kt9384.kt index c211c7ea18d..d169b5cf356 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt9384.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt9384.kt @@ -3,7 +3,7 @@ fun main(args: Array) { fun f() = run { private class C { private fun foo() { - f().foo(); + f().foo(); } } diff --git a/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt b/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt index 6594190f6c5..b0e5f9a585d 100644 --- a/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt +++ b/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt @@ -36,7 +36,7 @@ open class A { fun foo() { topLevelFun() - topLevelProperty++ + topLevelProperty++ "".topLevelExtensionFun() "".topLevelExtensionProperty diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt index 5bb908ef917..84b73ab44fd 100644 --- a/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt +++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt @@ -18,7 +18,7 @@ fun Foo.zbar(body: ZB fun test() { Foo().foo { zbar { - foo {} + foo {} } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt index 5266a314a10..266905762c6 100644 --- a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt +++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt @@ -41,7 +41,7 @@ fun test() { baz { y() - x() + x() with(D()) { x() diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt index 2f819ac657c..70127848792 100644 --- a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt +++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt @@ -37,7 +37,7 @@ fun test() { baz { y() - x() + x() with(D()) { x() diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt index 1a890f7586d..895b56c673b 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt @@ -4,7 +4,7 @@ fun String.invoke(i: Int) {} fun foo(i: Int) { - i(1) + i(1) 1(1) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt index c0fa5735df2..03dcf869e74 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt @@ -10,5 +10,5 @@ fun test(identifier: SomeClass, fn: String.() -> Unit) { identifier() identifier(123) identifier(1, 2) - 1.fn() + 1.fn() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt index 8506aab6882..2d80c60b1a8 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt @@ -17,7 +17,7 @@ fun test(a: A, b: B) { b.(foo)() - (b.foo)() + (b.foo)() foo(b) (foo)(b) @@ -25,7 +25,7 @@ fun test(a: A, b: B) { with(b) { a.foo() - a.(foo)() + a.(foo)() (a.foo)() diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt index 4ae07d7d055..f7b82eb131c 100644 --- a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt +++ b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt @@ -6,8 +6,8 @@ fun Int.invoke() {} class SomeClass fun test(identifier: SomeClass, fn: String.() -> Unit) { - identifier() - identifier(123) - identifier(1, 2) - 1.fn() + identifier() + identifier(123) + identifier(1, 2) + 1.fn() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/newLineLambda.kt b/compiler/testData/diagnostics/tests/resolve/newLineLambda.kt index 8fdbf5d6d37..c727cd3be2c 100644 --- a/compiler/testData/diagnostics/tests/resolve/newLineLambda.kt +++ b/compiler/testData/diagnostics/tests/resolve/newLineLambda.kt @@ -113,6 +113,6 @@ fun testTwoLambdas() { fun f1(): (() -> Unit) -> (() -> Unit) -> Unit { return { l1 -> l1() - { l2 -> l2() } + { l2 -> l2() } } } diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt index a1995d1d6e8..e04a1fff003 100644 --- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt +++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt @@ -7,4 +7,4 @@ object X2 fun foo(x: T1, f: (T1) -> T1) = X1 fun foo(xf: () -> T2, f: (T2) -> T2) = X2 -val test: X2 = foo({ 0 }, { it -> it + 1 }) \ No newline at end of file +val test: X2 = foo({ 0 }, { it -> it + 1 }) \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt b/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt index 0abb973ecd9..4cb170e505d 100644 --- a/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt +++ b/compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt @@ -1,4 +1,4 @@ fun foo() { - x.yyy<XXX>() - x.yyy() + x.yyy<XXX>() + x.yyy() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt b/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt index 072fa4b1424..29afef1bca2 100644 --- a/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt +++ b/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt @@ -9,13 +9,13 @@ val Int.foo: Int get() = 4 fun Int.extFun() = 4 fun String.test() { - some + some some.A() - "".some + "".some - foo - "".foo + foo + "".foo - extFun() - "".extFun() + extFun() + "".extFun() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.kt b/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.kt index 5fc2e26224d..f108ab528f9 100644 --- a/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.kt +++ b/compiler/testData/diagnostics/tests/samConversions/OverloadPriority.kt @@ -27,5 +27,5 @@ fun test(j: J) { j.bas({ it checkType { _() }; "" }, "") checkType { _() } // NI: TODO - j.bar { it checkType { _() }; "" } checkType { _() } + j.bar { it checkType { _() }; "" } checkType { _() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.kt b/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.kt index 3c30a5bc341..e6153c5b49d 100644 --- a/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.kt +++ b/compiler/testData/diagnostics/tests/samConversions/OverloadPriorityKT.kt @@ -26,5 +26,5 @@ fun test(k: K) { k.bas { it checkType { _() }; "" } checkType { _() } // NI: TODO - k.bar { it checkType { _() }; "" } checkType { _() } + k.bar { it checkType { _() }; "" } checkType { _() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt b/compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt index 7ddf4a0abec..3ccc63dd2a1 100644 --- a/compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt +++ b/compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt @@ -19,9 +19,9 @@ annotation class Ann( Inner::class, Interface::class, CONST, - Companion.CONST, - Nested.CONST, - Interface.CONST, + Companion.CONST, + Nested.CONST, + Interface.CONST, a, b() ) diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt index fe6efb2684a..ac5937feaf9 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt @@ -35,8 +35,8 @@ class E: A() { object Z { init { - B().foo() - B().bar() + B().foo() + B().bar() D() C() @@ -60,7 +60,7 @@ class F: A() { companion object { init { B().fas() - D().f() + D().f() } } } diff --git a/compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt b/compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt index d8b38e0def1..b58ada088da 100644 --- a/compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt +++ b/compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt @@ -6,7 +6,7 @@ val List.length = List.length1 : Int get() = size -val String.bd = this + "!" +val String.bd = this + "!" val String.bd1 : String get() = this + "!" diff --git a/compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt b/compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt index b4b15fc708a..c50727d0459 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt @@ -31,7 +31,7 @@ open class BodyTag(name : String) : TagWithText(name) { class Body() : BodyTag(name) { // Must be an error! } -class Body1() : BodyTag(this.name) { // Must be an error! +class Body1() : BodyTag(this.name) { // Must be an error! } //more tests diff --git a/compiler/testData/diagnostics/tests/scopes/kt900-2.kt b/compiler/testData/diagnostics/tests/scopes/kt900-2.kt index 75af2441e76..dfa5528d2c2 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt900-2.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt900-2.kt @@ -14,7 +14,7 @@ val y: T = Y fun f() { bar() R.bar() - B.foo() + B.foo() } object M { diff --git a/compiler/testData/diagnostics/tests/scopes/kt900.kt b/compiler/testData/diagnostics/tests/scopes/kt900.kt index 8b321444717..714f9f21d91 100644 --- a/compiler/testData/diagnostics/tests/scopes/kt900.kt +++ b/compiler/testData/diagnostics/tests/scopes/kt900.kt @@ -5,11 +5,11 @@ package a fun foo() { val b : B = B() //only B() is unresolved, but in ": B" and "B.foo()" B should also be unresolved - B.foo() + B.foo() - P.foo() + P.foo() - M.bar() + M.bar() } class A() { diff --git a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt index 4762b0754ba..7f5faa5ea60 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt @@ -17,37 +17,37 @@ interface C { fun foo(x: Any?) { if (x is A && x is B) { - x.foo().checkType { _() } + x.foo().checkType { _() } x.foo().checkType { _() } } if (x is B && x is A) { - x.foo().checkType { _() } + x.foo().checkType { _() } x.foo().checkType { _() } } if (x is A && x is C) { x.foo().checkType { _() } - x.foo().checkType { _() } + x.foo().checkType { _() } } if (x is C && x is A) { x.foo().checkType { _() } - x.foo().checkType { _() } + x.foo().checkType { _() } } if (x is A && x is B && x is C) { x.foo().checkType { _() } - x.foo().checkType { _() } + x.foo().checkType { _() } } if (x is B && x is A && x is C) { x.foo().checkType { _() } - x.foo().checkType { _() } + x.foo().checkType { _() } } if (x is B && x is C && x is A) { x.foo().checkType { _() } - x.foo().checkType { _() } + x.foo().checkType { _() } } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt30927.kt b/compiler/testData/diagnostics/tests/smartCasts/kt30927.kt index bb9958bb433..9e68572e8f4 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/kt30927.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/kt30927.kt @@ -8,7 +8,7 @@ fun case_0() { this as Int this // error in NI: required Int, found Any?; just inferred to Any? in OI } - y checkType { _() } + y checkType { _() } y checkType { _() } } @@ -20,7 +20,7 @@ fun case_1(z: Any?) { else -> return@run "" } } - y checkType { _() } + y checkType { _() } y checkType { _() } // y is inferred to Any? } @@ -45,7 +45,7 @@ fun case_3(z: Any?) { else -> return@let "" } } - y checkType { _() } + y checkType { _() } y checkType { _() } // y is inferred to String } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt index 432d22c1a91..c2baa0e49d3 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt @@ -60,11 +60,11 @@ fun kt4565_1(a: SomeClass?) { fun kt4565_2(a: SomeClass?) { // To be supported if (a as? SubClass != null) { - a.extra.hashCode() + a.extra.hashCode() } val extra = (a as? SubClass)?.extra if (extra != null) { - a.extra.hashCode() + a.extra.hashCode() } } diff --git a/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt b/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt index 020fd619a9e..eefbcaff5b2 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt @@ -3,7 +3,7 @@ fun foo(): Int { val x: Any? = null val y = 2 if (x == y) { - return x + y + return x + y } return y } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt index 619cc29f317..08ec280670c 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt @@ -12,7 +12,7 @@ operator fun Long?.inc() = this?.let { it + 1 } fun bar(arg: Long?): Long { var i = arg if (i++ == 5L) { - return i-- + i + return i-- + i } if (i++ == 7L) { return i++ + i diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt index 11051429b06..3eca82fa791 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt @@ -15,7 +15,7 @@ class MyClass { m = create() // See KT-7428 for ((k, v) in m) - res += (k.length + v.length) + res += (k.length + v.length) return res } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt index 3378200c312..2b5e01c70de 100644 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt +++ b/compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt @@ -12,4 +12,4 @@ typealias CA = C val test1 = CA val test2 = CA.Companion val test3 = CA.x -val test4 = CA.Companion.x +val test4 = CA.Companion.x diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt index 835d4f813ec..831a749015f 100644 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt +++ b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt @@ -7,5 +7,5 @@ val KClass.java: Class get() = null!! val KClass.javaObjectType: Class get() { - return java.lang.Class::class.java as Class + return java.lang.Class::class.java as Class } diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt index 347ab0aed63..3cdb14768f5 100644 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt +++ b/compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt @@ -6,5 +6,5 @@ val KClass.java: Class get() = null!! val KClass.foo: Any? get() { - return java.lang.Integer::hashCode + return java.lang.Integer::hashCode } diff --git a/compiler/testData/diagnostics/tests/substitutions/starProjections.kt b/compiler/testData/diagnostics/tests/substitutions/starProjections.kt index d09276c0c03..2ce4d7b1316 100644 --- a/compiler/testData/diagnostics/tests/substitutions/starProjections.kt +++ b/compiler/testData/diagnostics/tests/substitutions/starProjections.kt @@ -17,9 +17,9 @@ interface B, T>> { } fun testB(b: B<*, *>) { - b.r().checkType { _() } - b.t().checkType { _, *>>() } + b.r().checkType { _() } + b.t().checkType { _, *>>() } - b.t().r().size + b.t().r().size } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt b/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt index f2ccc70c577..e5a1627f582 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/Super.kt @@ -17,24 +17,24 @@ class A() : C(), T { super.bar() super@A.foo() super@A.bar() - super<E>.bar() - super<E>@A.bar() - super<Int>.foo() - super<>.foo() - super<() -> Unit>.foo() - super<Unit>.foo() - super@B.foo() - super@B.bar() + super<E>.bar() + super<E>@A.bar() + super<Int>.foo() + super<>.foo() + super<() -> Unit>.foo() + super<Unit>.foo() + super@B.foo() + super@B.bar() } inner class B : T { fun test() { super.foo(); - super<C>.bar() + super<C>.bar() super@A.bar() super@A.foo() super@B.foo() - super<C>@B.foo() + super<C>@B.foo() super.foo() super super @@ -50,8 +50,8 @@ class CG : G { fun test() { super.foo() // OK super>.foo() // Warning - super<G<E>>.foo() // Error - super<G>.foo() // Error + super<G<E>>.foo() // Error + super<G>.foo() // Error } } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt b/compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt index 6e900cdb290..c9841f6b2be 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt @@ -1,4 +1,4 @@ fun String.f() { - super@f.compareTo("") - super.compareTo("") + super@f.compareTo("") + super.compareTo("") } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt b/compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt index 0d2f96f9f51..abcb78d99e1 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt @@ -1,5 +1,5 @@ fun foo() { super - super.foo() - super.foo() + super.foo() + super.foo() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt b/compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt index 93e72d66b55..bffe069dc0b 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt @@ -11,7 +11,7 @@ class A(val a:Int) { checkSubtype(this@A) } val b: Double.() -> Unit = a@{ checkSubtype(this@a) + checkSubtype(this@xx) } - val c = a@{ -> this@a + checkSubtype(this@xx) } + val c = a@{ -> this@a + checkSubtype(this@xx) } return (a@{checkSubtype(this@a) + checkSubtype(this@xx)}) } } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt index b8ba8255065..4efde3e90e0 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt @@ -14,7 +14,7 @@ class GenericDerivedClass : GenericBaseClass(), GenericBaseInterface { override fun bar(x: T): T = super.bar(x) override fun ambiguous(x: T): T = - super.ambiguous(x) + super.ambiguous(x) } class SpecializedDerivedClass : GenericBaseClass(), GenericBaseInterface { @@ -22,9 +22,9 @@ class SpecializedDerivedClass : GenericBaseCl override fun bar(x: String): String = super.bar(x) override fun ambiguous(x: String): String = - super.ambiguous(x) + super.ambiguous(x) override fun ambiguous(x: Int): Int = - super.ambiguous(x) + super.ambiguous(x) } class MixedDerivedClass : GenericBaseClass(), GenericBaseInterface { @@ -32,7 +32,7 @@ class MixedDerivedClass : GenericBaseClass override fun bar(x: T): T = super.bar(x) override fun ambiguous(x: Int): Int = - super.ambiguous(x) + super.ambiguous(x) override fun ambiguous(x: T): T = - super.ambiguous(x) + super.ambiguous(x) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt index a64c1d1ac17..6452e67908d 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt @@ -45,13 +45,13 @@ class Derived : Base(), Interface { super.prop fun getAmbiguousSuperProp(): Int = - super.ambiguousProp + super.ambiguousProp fun callsFunFromSuperInterface() { super.bar() } fun callsAmbiguousSuperFun() { - super.ambiguous() + super.ambiguous() } } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt index 2c948359434..a57a732a94c 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt @@ -34,6 +34,6 @@ class B : A(), I { } override fun qux() { - super.qux() + super.qux() } } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt index 402593c0a80..6d682b6de24 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt @@ -14,7 +14,7 @@ interface InterfaceWithFun { class DerivedUsingFun : BaseWithCallableProp(), InterfaceWithFun { fun foo(): String = - super.fn() + super.fn() override fun bar(): String = super.bar() diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt index e47de8d4306..6a404da2e0c 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt @@ -20,9 +20,9 @@ interface AnotherInterface { interface DerivedInterface: Interface, AnotherInterface { override fun foo() { super.foo() } override fun ambiguous() { - super.ambiguous() + super.ambiguous() } override val ambiguousProp: Int - get() = super.ambiguousProp + get() = super.ambiguousProp } diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt index 62be85258c6..979f8fd9f15 100644 --- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt +++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt @@ -41,13 +41,13 @@ class ClassDerivedFromUnresolved : Base(), Interface, Un super.prop fun getAmbiguousSuperProp(): Int = - super.ambiguousProp + super.ambiguousProp fun callsFunFromSuperInterface() { super.bar() } fun callsAmbiguousSuperFun() { - super.ambiguous() + super.ambiguous() } } diff --git a/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt b/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt index 76f6efb62fb..a5f98675826 100644 --- a/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt +++ b/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt @@ -20,5 +20,5 @@ typealias GIntI = Generic.Inner fun test2(x: Generic) = x.GI() fun test3(x: Generic) = x.GI() fun test4(x: Generic>) = x.GI() -fun test5(x: Generic) = x.GIntI() +fun test5(x: Generic) = x.GIntI() fun Generic.test6() = GIntI() \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt index 6df08f13456..cb6c4a4f7b0 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt @@ -16,6 +16,6 @@ class C { val c = C.Self.Self() val n = C.Self.Nested() val x = C.Self.X -val n2 = C.Nested.Root.Nested.N2() +val n2 = C.Nested.Root.Nested.N2() val ic = C.Self.InCompanion() val ok = C.Self.ok diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt index 749d9156199..43c7ef4ef11 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt @@ -23,7 +23,7 @@ class TestSuperForBase : B() { super.foo() super.foo() super.foo() - super<U>.foo() + super<U>.foo() } } @@ -36,6 +36,6 @@ class TestSuperForGenericBase : GB() { super.foo() super.foo() super.foo() // Type arguments don't matter here - super<U>.foo() + super<U>.foo() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/platformDependent.kt b/compiler/testData/diagnostics/testsWithJsStdLib/platformDependent.kt index 6c27efb5236..999f379fc9b 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/platformDependent.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/platformDependent.kt @@ -1,5 +1,5 @@ fun test(m: Map, mm: MutableMap) { - m.getOrDefault("2", 1) - mm.getOrDefault(1, "2") + m.getOrDefault("2", 1) + mm.getOrDefault(1, "2") mm.remove(1, "2") } diff --git a/compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt b/compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt index 9f7173f0fc3..97ac64d6069 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt @@ -3,7 +3,7 @@ import kotlin.Array as KotlinArray fun f() { listOf(1).map1 { it.hashCode() } - listOf(1).map { it.hashCode() } + listOf(1).map { it.hashCode() } } fun g(a1: KotlinArray, a2: Array){} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt index 3193f62b307..28b7b07b3fb 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt @@ -41,7 +41,7 @@ class ManySupers: Foo2(), B { fun foo() { super.test() super<B>.test() - super.test() + super.test() } } @@ -49,7 +49,7 @@ class ManySupers2: Foo2(), C { fun foo() { super.test() super.test() - super.test() + super.test() } } @@ -57,6 +57,6 @@ class ManySupers2: Foo2(), C { fun foo() { super.test() super.test() - super.test() + super.test() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.kt index 3ca5c9a8160..8b55b9c80f5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReference/callableReferenceOnUnresolvedLHS.kt @@ -8,6 +8,6 @@ class Scope(private val implClass: hm = c.asSequence() .filter(implClass::isInstance) .map(implClass::cast) - .toSet() + .toSet() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt index 8e8665a96fa..893ff1442e1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt @@ -14,6 +14,6 @@ suspend fun fib(n: Long) = async { when { n < 2 -> n - else -> fib(n - 1).await() + fib(n - 2).await() + else -> fib(n - 1).await() + fib(n - 2).await() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_2.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_2.kt index 8288fe0214a..d57a7f75988 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_2.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_2.kt @@ -82,7 +82,7 @@ fun test() { this@with.yield("") yield2("") - this@with.yield2("") + this@with.yield2("") } } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.kt index 38be2d4af7d..b2cda3566d3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.kt @@ -87,7 +87,7 @@ fun test() { this@with.yield("") yield2("") - this@with.yield2("") + this@with.yield2("") } } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt index 4bb43565fbd..88f8c40b79e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt @@ -5,10 +5,10 @@ import kotlin.coroutines.experimental.* import kotlin.coroutines.experimental.intrinsics.* suspend fun foo(): Unit = suspendCoroutine { - it.resume(Unit) + it.resume(Unit) } suspend fun bar(): Unit = suspendCoroutineUninterceptedOrReturn { - it.resume(Unit) + it.resume(Unit) COROUTINE_SUSPENDED } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt index 6b2e2c5c47c..480695aa678 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt @@ -36,7 +36,7 @@ fun test() { severalParams("", 89) checkType { _() } // TODO: should we allow somehow to call with passing continuation explicitly? - severalParams("", 89, 6.9) checkType { _() } + severalParams("", 89, 6.9) checkType { _() } "".stringReceiver(1) Any().anyReceiver(1) diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.kt index 2d16495b22b..9805dbd380a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndTopLevelCapturedTypes.kt @@ -23,7 +23,7 @@ fun test( invOut.onlyOut(1L) invOut.onlyOutUB("str") - invStar.onlyOutUB(0) + invStar.onlyOutUB(0) invOut.onlyOutUB(42) invOut.onlyOutUB(1L) diff --git a/compiler/testData/diagnostics/testsWithStdLib/kt9078.kt b/compiler/testData/diagnostics/testsWithStdLib/kt9078.kt index 17ac0a0e3af..968b1e39f01 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/kt9078.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/kt9078.kt @@ -3,7 +3,7 @@ abstract class KFunctionKt9005WorkAround(private val _functionInsta private val _reflectedFunction: kotlin.reflect.KFunction = _functionInstance.reflect() ?: throw IllegalStateException("") private val _parameters: List = run { - _functionInstance.javaClass.methods.first().parameters.map { + _functionInstance.javaClass.methods.first().parameters.map { object : kotlin.reflect.KParameter { override val index: Int = 0 } diff --git a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt b/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt index cc0e14bb2a3..3f38d5a2327 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt @@ -1,3 +1,3 @@ // !LANGUAGE: -DefaultImportOfPackageKotlinComparisons -fun foo() = compareBy { it.length } +fun foo() = compareBy { it.length } diff --git a/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.kt b/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.kt index ce5e61ce241..14a18f20ef5 100644 --- a/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.kt +++ b/compiler/testData/diagnostics/testsWithUnsignedTypes/conversions/inferenceForSignedAndUnsignedTypes.kt @@ -10,7 +10,7 @@ fun select(x: K, y: K): K = TODO() fun takeUByte(u: UByte) {} fun foo() { - select(1, 1u) checkType { _>() } + select(1, 1u) checkType { _>() } takeUByte(id(1)) 1 + 1u diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg/1.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg/1.kt index ec516f187c7..1b18eb8e123 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg/1.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/common/neg/1.kt @@ -64,7 +64,7 @@ fun case_2(value_1: Int?, value_2: Int?, value_3: Any?) { val value_4: Int when (value_1.case_2(value_2, value_3) { value_4 = 10 }) { true -> { - println(value_3?.xor(true)) + println(value_3?.xor(true)) println(value_4) println(value_1.inv()) println(value_2.inv()) @@ -75,7 +75,7 @@ fun case_2(value_1: Int?, value_2: Int?, value_3: Any?) { println(value_2) } null -> { - println(value_3?.xor(true)) + println(value_3?.xor(true)) println(value_4) println(value_1) println(value_2) diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.kt index cc62e857cf2..35d82883c83 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/10.kt @@ -459,10 +459,10 @@ fun case_18(value_1: Any?) { // TESTCASE NUMBER: 19 fun case_19(value_1: Number) { - when { !value_1.case_19_1() -> println(value_1.inv()) } - when { value_1.case_19_2() -> println(value_1.inv()) } - when { value_1.case_19_3() == null -> println(value_1.inv()) } - when { value_1.case_19_4() != null -> println(value_1.inv()) } + when { !value_1.case_19_1() -> println(value_1.inv()) } + when { value_1.case_19_2() -> println(value_1.inv()) } + when { value_1.case_19_3() == null -> println(value_1.inv()) } + when { value_1.case_19_4() != null -> println(value_1.inv()) } } // TESTCASE NUMBER: 20 @@ -498,16 +498,16 @@ fun case_22(value_1: Any?, value_2: Any?) { // TESTCASE NUMBER: 23 fun case_23(value_1: Number?, value_2: Number?) { - if (value_1.case_23_1()) println(value_1.inv()) - if (value_2.case_23_2() == null) println(value_2.inv()) - if (value_2.case_23_3() != null) println(value_2.inv()) + if (value_1.case_23_1()) println(value_1.inv()) + if (value_2.case_23_2() == null) println(value_2.inv()) + if (value_2.case_23_3() != null) println(value_2.inv()) } // TESTCASE NUMBER: 24 fun case_24(value_1: Any?, value_2: Any?) { - if (value_1.case_24_1()) println(value_1.inv()) - if (value_2.case_24_2() != null) println(value_2.inv()) - if (value_2.case_24_3() == null) println(value_2.inv()) + if (value_1.case_24_1()) println(value_1.inv()) + if (value_2.case_24_2() != null) println(value_2.inv()) + if (value_2.case_24_3() == null) println(value_2.inv()) } // TESTCASE NUMBER: 25 diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/15.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/15.kt index abce34e1451..00b288e938d 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/15.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/15.kt @@ -40,14 +40,14 @@ import contracts.* // TESTCASE NUMBER: 1 fun case_1(value: Any) { if (contracts.case_1_2(contracts.case_1_1(value is Char))) { - println(value.category) + println(value.category) } } // TESTCASE NUMBER: 2 fun case_2(value: Any) { if (contracts.case_2(value is Char) is Boolean) { - println(value.category) + println(value.category) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/4.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/4.kt index 6d70b7c2abc..cb125138bf6 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/4.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/4.kt @@ -154,7 +154,7 @@ fun case_1(value_1: Any?) { // TESTCASE NUMBER: 2 fun case_2(value_1: Number) { value_1.case_2() - println(value_1.inv()) + println(value_1.inv()) } // TESTCASE NUMBER: 3 @@ -183,10 +183,10 @@ fun case_5(value_1: Any?) { // TESTCASE NUMBER: 6 fun case_6(value_1: Number) { - when { value_1.case_6_1() -> println(value_1.inv()) } - when { !value_1.case_6_2() -> println(value_1.inv()) } - when { value_1.case_6_3() != null -> println(value_1.inv()) } - when { value_1.case_6_4() != null -> println(value_1.inv()) } + when { value_1.case_6_1() -> println(value_1.inv()) } + when { !value_1.case_6_2() -> println(value_1.inv()) } + when { value_1.case_6_3() != null -> println(value_1.inv()) } + when { value_1.case_6_4() != null -> println(value_1.inv()) } } // TESTCASE NUMBER: 7 diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/5.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/5.kt index 7de668718b5..e13517a7ef8 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/5.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/5.kt @@ -100,13 +100,13 @@ fun case_1(value_1: Any?) { // TESTCASE NUMBER: 2 fun case_2(value_1: Number?) { value_1.case_2() - println(value_1.inv()) + println(value_1.inv()) } // TESTCASE NUMBER: 3 fun case_3(value_1: Any?) { value_1.case_3() - println(value_1.inv()) + println(value_1.inv()) } // TESTCASE NUMBER: 4 @@ -119,16 +119,16 @@ fun case_4(value_1: Any?, value_2: Any?, value_3: Any?) { // TESTCASE NUMBER: 5 fun case_5(value_1: Number?, value_2: Number?, value_3: Number?) { - if (value_1.case_5_1()) println(value_1.inv()) - if (!value_2.case_5_2()) println(value_2.inv()) - if (value_3.case_5_3() != null) println(value_3.inv()) - if (value_3.case_5_4() == null) println(value_3.inv()) + if (value_1.case_5_1()) println(value_1.inv()) + if (!value_2.case_5_2()) println(value_2.inv()) + if (value_3.case_5_3() != null) println(value_3.inv()) + if (value_3.case_5_4() == null) println(value_3.inv()) } // TESTCASE NUMBER: 6 fun case_6(value_1: Any?, value_2: Any?, value_3: Any?) { - if (value_1.case_6_1()) println(value_1.inv()) - if (!value_2.case_6_2()) println(value_2.inv()) - if (value_3.case_6_3() == null) println(value_3.inv()) - if (value_3.case_6_4() != null) println(value_3.inv()) + if (value_1.case_6_1()) println(value_1.inv()) + if (!value_2.case_6_2()) println(value_2.inv()) + if (value_3.case_6_3() == null) println(value_3.inv()) + if (value_3.case_6_4() != null) println(value_3.inv()) } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/6.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/6.kt index 8554784789f..4890ef13989 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/6.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/6.kt @@ -125,21 +125,21 @@ fun case_1(value_1: Any?, value_2: Int?) { // TESTCASE NUMBER: 2 fun case_2(value_1: Number?, value_2: Any?) { value_1.case_2(value_2) - println(value_1.inv()) + println(value_1.inv()) println(value_2.toByte()) } // TESTCASE NUMBER: 3 fun case_3(value_1: Any?, value_2: String?) { value_1.case_3(value_2) - println(value_1.inv()) + println(value_1.inv()) println(value_2.length) } // TESTCASE NUMBER: 4 fun case_4(value_1: Any?, value_2: Number, value_3: Any?, value_4: String?) { value_1.case_4(value_2, value_3, value_4) - println(value_2.inv()) + println(value_2.inv()) println(value_3.toByte()) println(value_4.length) } @@ -169,19 +169,19 @@ fun case_5(value_1: Any?, value_2: Int?, value_3: Any?, value_4: Int?, value_5: // TESTCASE NUMBER: 6 fun case_6(value_1: Number?, value_2: Any?, value_3: Number?, value_4: Any?, value_5: Number?, value_6: Any?) { if (value_1.case_6_1(value_2)) { - println(value_1.inv()) + println(value_1.inv()) println(value_2.toByte()) } if (!value_3.case_6_2(value_4)) { - println(value_3.inv()) + println(value_3.inv()) println(value_4.toByte()) } if (value_5.case_6_3(value_6) != null) { - println(value_5.inv()) + println(value_5.inv()) println(value_6.toByte()) } if (value_5.case_6_4(value_6) == null) { - println(value_5.inv()) + println(value_5.inv()) println(value_6.toByte()) } } @@ -189,35 +189,35 @@ fun case_6(value_1: Number?, value_2: Any?, value_3: Number?, value_4: Any?, val // TESTCASE NUMBER: 7 fun case_7(value_1: Any?, value_2: String?, value_3: Any?, value_4: String?, value_5: Any?, value_6: String?) { if (value_1.case_7_1(value_2)) { - println(value_1.inv()) + println(value_1.inv()) println(value_2.length) } if (value_3.case_7_2(value_4)) { - println(value_3.inv()) + println(value_3.inv()) println(value_4.length) } if (value_5.case_7_3(value_6) != null) { - println(value_5.inv()) + println(value_5.inv()) println(value_6.length) } if (value_5.case_7_4(value_6) == null) { - println(value_5.inv()) + println(value_5.inv()) println(value_6.length) } } // TESTCASE NUMBER: 8 fun case_8(value_1: Any?, value_2: Number, value_3: Any?, value_4: String?) { - when { value_1.case_8_1(value_2, value_3, value_4) -> println(value_2.inv()) } + when { value_1.case_8_1(value_2, value_3, value_4) -> println(value_2.inv()) } when { value_1.case_8_1(value_2, value_3, value_4) -> println(value_3.toByte()) } when { value_1.case_8_1(value_2, value_3, value_4) -> println(value_4.length) } - when { !value_1.case_8_2(value_2, value_3, value_4) -> println(value_2.inv()) } + when { !value_1.case_8_2(value_2, value_3, value_4) -> println(value_2.inv()) } when { !value_1.case_8_2(value_2, value_3, value_4) -> println(value_3.toByte()) } when { !value_1.case_8_2(value_2, value_3, value_4) -> println(value_4.length) } - when { value_1.case_8_3(value_2, value_3, value_4) == null -> println(value_2.inv()) } + when { value_1.case_8_3(value_2, value_3, value_4) == null -> println(value_2.inv()) } when { value_1.case_8_3(value_2, value_3, value_4) == null -> println(value_3.toByte()) } when { value_1.case_8_3(value_2, value_3, value_4) == null -> println(value_4.length) } - when { value_1.case_8_4(value_2, value_3, value_4) != null -> println(value_2.inv()) } + when { value_1.case_8_4(value_2, value_3, value_4) != null -> println(value_2.inv()) } when { value_1.case_8_4(value_2, value_3, value_4) != null -> println(value_3.toByte()) } when { value_1.case_8_4(value_2, value_3, value_4) != null -> println(value_4.length) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.kt index 734574c4eaf..39ba9f77be5 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/7.kt @@ -230,7 +230,7 @@ fun case_2(value_1: Number?) { case_2_1(value_1) value_1.toByte() case_2_2(value_1) - value_1.inv() + value_1.inv() } // TESTCASE NUMBER: 3 @@ -292,25 +292,25 @@ fun case_6(value_1: Number?) { when { case_6_1(value_1) -> { value_1.toByte() - when { case_6_2(value_1) -> value_1.inv() } + when { case_6_2(value_1) -> value_1.inv() } } } when { !case_6_3(value_1) -> { value_1.toByte() - when { !case_6_4(value_1) -> value_1.inv() } + when { !case_6_4(value_1) -> value_1.inv() } } } when { case_6_5(value_1) != null -> { value_1.toByte() - when { case_6_6(value_1) != null -> value_1.inv() } + when { case_6_6(value_1) != null -> value_1.inv() } } } when { case_6_7(value_1) == null -> { value_1.toByte() - when { case_6_8(value_1) == null -> value_1.inv() } + when { case_6_8(value_1) == null -> value_1.inv() } } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt index 28cc948454e..6b88b86d5f5 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/analysis/smartcasts/neg/8.kt @@ -71,7 +71,7 @@ fun case_1(value_1: Any?) { println(value_1?.toByte()) if (funWithReturnsTrue(value_1 !is Number)) { println(value_1.toByte()) - if (funWithReturnsNotNull(value_1 is Int) == null) println(value_1.inv()) + if (funWithReturnsNotNull(value_1 is Int) == null) println(value_1.inv()) } } @@ -81,7 +81,7 @@ fun case_2(value_1: Any?) { println(value_1?.toByte()) funWithReturns(value_1 !is Number) println(value_1.toByte()) - if (funWithReturnsNull(value_1 !is Int) == null) println(value_1.inv()) + if (funWithReturnsNull(value_1 !is Int) == null) println(value_1.inv()) } } @@ -100,7 +100,7 @@ fun case_3(value_1: Int?, value_2: Any?) { // TESTCASE NUMBER: 4 fun case_4(value_1: Number, value_2: (() -> Unit)?) { if (contracts.case_4(value_1, value_2) == true) { - value_1.inv() + value_1.inv() } else if (contracts.case_4(value_1, value_2) == false) { println(value_2) } else if (contracts.case_4(value_1, value_2) == null) { @@ -117,7 +117,7 @@ fun case_5(value_1: Number?, value_2: String?) { } false -> { println(value_2.length) - println(value_1.inv()) + println(value_1.inv()) } } } @@ -134,7 +134,7 @@ fun case_6(value_1: Number, value_2: String?, value_3: Any?) { println(value_2.length) } null -> { - println(value_1.inv()) + println(value_1.inv()) } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt index 90089af0dd4..51581791a85 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/1.kt @@ -189,42 +189,42 @@ fun case_12(x: TypealiasNullableStringIndirect, y: TypealiasNullableStringIndire // TESTCASE NUMBER: 13 fun case_13(x: otherpackage.Case13?) = - if ((x == null !is Boolean) !== true) { + if ((x == null !is Boolean) !== true) { throw Exception() } else { x - x.equals(x) + x.equals(x) } // TESTCASE NUMBER: 14 class Case14 { val x: otherpackage.Case14? init { - x = otherpackage.Case14() + x = otherpackage.Case14() } } fun case_14() { val a = Case14() - if (a.x != null !is Boolean !is Boolean) { - if (a.x != null == true) { + if (a.x != null !is Boolean !is Boolean) { + if (a.x != null == true) { if (a.x !== null == false) { - if (a.x != null == null) { - if (a.x != null !== null) { - if (a.x != null === true) { + if (a.x != null == null) { + if (a.x != null !== null) { + if (a.x != null === true) { if (a.x !== null === true !is Boolean == true) { - if (a.x != null !== false) { - if (a.x != null === false) { + if (a.x != null !== false) { + if (a.x != null === false) { if (a.x !== null === true) { - if ((a.x != null != true) !is Boolean) { - if (a.x != null is Boolean) { - if (a.x != null is Boolean is Boolean) { + if ((a.x != null != true) !is Boolean) { + if (a.x != null is Boolean) { + if (a.x != null is Boolean is Boolean) { if (a.x !== null is Boolean) { - if (a.x != null is Boolean) { + if (a.x != null is Boolean) { if ((a.x !== null !is Boolean) == false) { a.x - a.x.equals(a.x) + a.x.equals(a.x) } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/10.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/10.kt index 92c73c4178f..09f083015c2 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/10.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/10.kt @@ -22,5 +22,5 @@ fun case_1() { } x - x.inv() + x.inv() } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/4.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/4.kt index 8a6703de417..89360a89d13 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/4.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/4.kt @@ -15,7 +15,7 @@ fun case_1(x: Any?) { if (x is Int is Boolean) { x - x.inv() + x.inv() x.not() x.propAny x.funAny() @@ -26,7 +26,7 @@ fun case_1(x: Any?) { fun case_2(x: Any?) { if (x is Int is Any? is Boolean) { x - x.inv() + x.inv() x.not() x.propAny x.funAny() @@ -37,7 +37,7 @@ fun case_2(x: Any?) { inline fun case_3(x: Any?) { if (x is Int is T) { x - x.inv() + x.inv() x.propAny x.funAny() } @@ -47,7 +47,7 @@ inline fun case_3(x: Any?) { inline fun Boolean>case_4(x: Any?) { if (x is Int is T == null) { x - x.inv() + x.inv() x.propAny x.funAny() } @@ -57,7 +57,7 @@ inline fun Boolean>case_4(x: Any?) { fun case_5(x: Any?) { if (x is Int != null) { x - x.inv() + x.inv() x.propAny x.funAny() } @@ -67,7 +67,7 @@ fun case_5(x: Any?) { fun case_6(x: Any?) { if (x is Int == null) { x - x.inv() + x.inv() x.propAny x.funAny() } @@ -77,7 +77,7 @@ fun case_6(x: Any?) { fun case_7(x: Any?) { if (!(x !is Int) == false) { x - x.inv() + x.inv() x.propAny x.funAny() } @@ -87,7 +87,7 @@ fun case_7(x: Any?) { fun case_8(x: Any?) { if (!(x !is Int) == true) else { x - x.inv() + x.inv() x.propAny x.funAny() } @@ -97,7 +97,7 @@ fun case_8(x: Any?) { fun case_9(x: Any?) { if (x !is Int !is Any?) { x - x.inv() + x.inv() x.propAny x.funAny() } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/42.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/42.kt index daba37cebb9..2d572288d9e 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/42.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/42.kt @@ -162,7 +162,7 @@ fun case_14(x: Any) { x.NaN } else { x - x.inv() + x.inv() } } } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt index c828ce9f5a4..b458cfa95cf 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/43.kt @@ -72,7 +72,7 @@ fun case_5(x: SealedClass) { when (x) { is SealedChild1 -> x.number is SealedChild2 -> x.e1 + x.e2 - else -> x.m1 + x.m1 + else -> x.m1 + x.m1 } } @@ -85,6 +85,6 @@ fun case_6(x: SealedClass?) { is SealedChild1 -> x.number is SealedChild2 -> x.e1 + x.e2 null -> {} - else -> x.m1 + x.m1 + else -> x.m1 + x.m1 } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/44.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/44.kt index 0a99451b8a3..aa1bb038aae 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/44.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/44.kt @@ -29,7 +29,7 @@ fun case_1(x: Int?) { fun case_2(x: Any?) { val y = x is Int if (y) { - x.inv() + x.inv() } } @@ -40,7 +40,7 @@ fun case_2(x: Any?) { fun case_3(x: T) { val y = x is Int if (y) { - x.inv() + x.inv() } } @@ -51,6 +51,6 @@ fun case_3(x: T) { fun case_4(x: T) { val y = x is Int? if (y) { - x?.inv() + x?.inv() } } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/6.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/6.kt index 0bcb08ece9b..2d077de237b 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/6.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/6.kt @@ -15,7 +15,7 @@ fun case_1(x: Any?) { if (x is Int || x !is Int) { x - x.inv() + x.inv() } } @@ -73,7 +73,7 @@ fun case_7(x: Any) { fun case_8(x: Any?) { if (x is Int? == x is Int?) else { x - x?.inv() + x?.inv() } } @@ -82,7 +82,7 @@ fun case_9(x: Any?) { if (!!!(x !is TypealiasNullableStringIndirect?)) else { if (!(x !is TypealiasNullableStringIndirect?)) else { x - x?.get(0) + x?.get(0) } } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/20.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/20.kt index 7759beeb3ea..044de9c1ae3 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/20.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/20.kt @@ -91,7 +91,7 @@ fun case_8(x: Any?) { fun case_9(x: Any?) { if (true && true && !!(x !is TypealiasNullableStringIndirect?) && true && true && true && true) else { x - x?.get(0) + x?.get(0) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/21.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/21.kt index dacd7086943..6665e13d297 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/21.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/21.kt @@ -27,7 +27,7 @@ fun case_1(x: Any?) { fun case_2(x: Any) { if (x is Int === true) { x - x.inv() + x.inv() } } @@ -83,7 +83,7 @@ fun case_7(x: Any) { fun case_8(x: Any?) { if (!(x is Int?) !== false !== false !== false) else { x - x?.inv() + x?.inv() } } @@ -95,7 +95,7 @@ fun case_8(x: Any?) { fun case_9(x: Any?) { if (!!(x !is TypealiasNullableStringIndirect?) !== false === true) else { x - x?.get(0) + x?.get(0) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/39.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/39.kt index c49bb70edb9..dd9ec9dc056 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/39.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/39.kt @@ -21,7 +21,7 @@ fun case_1(x: Number?) { if (x == y) { x - x.inv() + x.inv() } } @@ -56,7 +56,7 @@ fun case_4() { if (x == y) { x - x?.inv() + x?.inv() } } @@ -68,6 +68,6 @@ fun case_4() { fun case_5(x: Class, y: Class) { if (x.prop_14 == y.prop_15) { ?")!>x.prop_14 - ?")!>x.prop_14.inv() + ?")!>x.prop_14.inv() } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/48.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/48.kt index d56385eaba6..2dc3681b999 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/48.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/48.kt @@ -33,7 +33,7 @@ fun case_1(x: Any?, y: Any?) { fun case_2(x: Any?, y: Any?) { if (x as Int === y) { x - x.inv(10) + x.inv(10) y y.inv(10) } @@ -61,7 +61,7 @@ fun case_3(x: Any?, y: Any?) { fun case_4(x: Any?, y: Any?) { if (y === x as Int) { x - x.inv(10) + x.inv(10) y y.inv(10) } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/49.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/49.kt index cee0c20d232..50895cbcc6d 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/49.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/49.kt @@ -19,7 +19,7 @@ fun case_1(x: Any?) { if (x is Int == @RetentionSourceAndTargetExpression true) { x - x.inv() + x.inv() } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/68.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/68.kt index bd455460119..c169e1777e1 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/68.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/68.kt @@ -17,7 +17,7 @@ fun case_1(x: Any?) { if (x!! is Int) { x - x.inv() + x.inv() } } @@ -32,7 +32,7 @@ fun case_2(x: Any?) { fun case_3(x: Any?) { if (x as Number? is Int) { x - x.inv() + x.inv() } } diff --git a/idea/testData/findUsages/kotlin/conventions/set.results.txt b/idea/testData/findUsages/kotlin/conventions/set.results.txt index f4c36de1112..5606a06911a 100644 --- a/idea/testData/findUsages/kotlin/conventions/set.results.txt +++ b/idea/testData/findUsages/kotlin/conventions/set.results.txt @@ -1,3 +1,3 @@ Function call 11 a.set(2, B(2)) Implicit 'set' 12 a[1] = B(2) -Implicit 'set' 13 a[2]++ \ No newline at end of file +Unclassified usage 13 a[2]++ \ No newline at end of file diff --git a/idea/testData/multiModuleHighlighting/differentJdk/mockJdk/main.kt b/idea/testData/multiModuleHighlighting/differentJdk/mockJdk/main.kt index 1fadfce7269..57908684520 100644 --- a/idea/testData/multiModuleHighlighting/differentJdk/mockJdk/main.kt +++ b/idea/testData/multiModuleHighlighting/differentJdk/mockJdk/main.kt @@ -50,5 +50,5 @@ fun buildList(): List = null!! fun myFile(): File = null!! fun mainJdk6(x: List) { - x.stream().filter { it.length > 0 } + x.stream().filter { it.length > 0 } } diff --git a/idea/testData/multiModuleHighlighting/languageVersionsViaFacets/m2/m2.kt b/idea/testData/multiModuleHighlighting/languageVersionsViaFacets/m2/m2.kt index 9b9bb568161..553d405664a 100644 --- a/idea/testData/multiModuleHighlighting/languageVersionsViaFacets/m2/m2.kt +++ b/idea/testData/multiModuleHighlighting/languageVersionsViaFacets/m2/m2.kt @@ -2,9 +2,9 @@ package languageVersion1_0 public fun useJavaMap1_0(): java.util.HashMap { val g = java.util.HashMap() - g.values.removeIf { it < 5 } + g.values.removeIf { it < 5 } return g } -val use1_1 = languageVersion1_1.useJavaMap1_1().values.removeIf { it < 5 } +val use1_1 = languageVersion1_1.useJavaMap1_1().values.removeIf { it < 5 } diff --git a/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m1/m1.kt b/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m1/m1.kt index 7c5e47f9eb8..1cf65611d60 100644 --- a/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m1/m1.kt +++ b/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m1/m1.kt @@ -5,25 +5,25 @@ public fun testUseAsReceiver(api: javaInterface.API) { this.length } api.useM1B { - this.length + this.length } api.useM2A { this.length } api.useM2B { - this.length + this.length } } public fun testUseAsParameter(api: javaInterface.API) { api.useM1A { - it.length + it.length } api.useM1B { it.length } api.useM2A { - it.length + it.length } api.useM2B { it.length diff --git a/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m2/m2.kt b/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m2/m2.kt index 6fc898bbc91..9ca4760408a 100644 --- a/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m2/m2.kt +++ b/idea/testData/multiModuleHighlighting/samWithReceiverExtension/m2/m2.kt @@ -2,13 +2,13 @@ package m2 public fun testUseAsReceiver(api: javaInterface.API) { api.useM1A { - this.length + this.length } api.useM1B { this.length } api.useM2A { - this.length + this.length } api.useM2B { this.length @@ -20,12 +20,12 @@ public fun testUseAsParameter(api: javaInterface.API) { it.length } api.useM1B { - it.length + it.length } api.useM2A { it.length } api.useM2B { - it.length + it.length } } \ No newline at end of file diff --git a/idea/testData/multiplatform/typeAliasToExpectClassExplicitReference/jvm/jvm.kt b/idea/testData/multiplatform/typeAliasToExpectClassExplicitReference/jvm/jvm.kt index f1c603df801..7c16bca35e6 100644 --- a/idea/testData/multiplatform/typeAliasToExpectClassExplicitReference/jvm/jvm.kt +++ b/idea/testData/multiplatform/typeAliasToExpectClassExplicitReference/jvm/jvm.kt @@ -5,6 +5,6 @@ actual class A { } fun test() { - TypealiasFromCommon().commonMember() - TypealiasFromCommon().platformwMember() + TypealiasFromCommon().commonMember() + TypealiasFromCommon().platformwMember() } \ No newline at end of file diff --git a/idea/testData/multiplatform/useCorrectBuiltIns/common/common.kt b/idea/testData/multiplatform/useCorrectBuiltIns/common/common.kt index c85eec1e4ed..af5ca42c9b6 100644 --- a/idea/testData/multiplatform/useCorrectBuiltIns/common/common.kt +++ b/idea/testData/multiplatform/useCorrectBuiltIns/common/common.kt @@ -12,5 +12,5 @@ fun nativeSpecific() { } fun jsSpecific() { - val windowClosed = window.closed + val windowClosed = window.closed } \ No newline at end of file diff --git a/idea/testData/multiplatform/useCorrectBuiltIns/jvmWithSdk/jvmWithSdk.kt b/idea/testData/multiplatform/useCorrectBuiltIns/jvmWithSdk/jvmWithSdk.kt index 2c7f1388846..539574f2480 100644 --- a/idea/testData/multiplatform/useCorrectBuiltIns/jvmWithSdk/jvmWithSdk.kt +++ b/idea/testData/multiplatform/useCorrectBuiltIns/jvmWithSdk/jvmWithSdk.kt @@ -12,5 +12,5 @@ fun nativeSpecific() { } fun jsSpecific() { - val windowClosed = window.closed + val windowClosed = window.closed } \ No newline at end of file diff --git a/idea/testData/multiplatform/useCorrectBuiltIns/native/native.kt b/idea/testData/multiplatform/useCorrectBuiltIns/native/native.kt index c85eec1e4ed..af5ca42c9b6 100644 --- a/idea/testData/multiplatform/useCorrectBuiltIns/native/native.kt +++ b/idea/testData/multiplatform/useCorrectBuiltIns/native/native.kt @@ -12,5 +12,5 @@ fun nativeSpecific() { } fun jsSpecific() { - val windowClosed = window.closed + val windowClosed = window.closed } \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/AbstractInlineTest.kt b/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/AbstractInlineTest.kt index 5fd9a8802d2..e6c44a6c49d 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/AbstractInlineTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/AbstractInlineTest.kt @@ -47,7 +47,7 @@ abstract class AbstractInlineTest : KotlinLightCodeInsightFixtureTestCase() { val afterFileExists = afterFile.exists() val targetElement = - TargetElementUtil.findTargetElement(myFixture.editor, ELEMENT_NAME_ACCEPTED or REFERENCED_ELEMENT_ACCEPTED)!! + TargetElementUtil.findTargetElement(myFixture.editor, ELEMENT_NAME_ACCEPTED or REFERENCED_ELEMENT_ACCEPTED) ?: return @Suppress("DEPRECATION") val handler = Extensions.getExtensions(InlineActionHandler.EP_NAME).firstOrNull { it.canInlineElement(targetElement) } diff --git a/plugins/uast-kotlin/testData/DestructuringDeclaration.log-ide.txt b/plugins/uast-kotlin/testData/DestructuringDeclaration.log-ide.txt deleted file mode 100644 index 77771a8dd73..00000000000 --- a/plugins/uast-kotlin/testData/DestructuringDeclaration.log-ide.txt +++ /dev/null @@ -1,49 +0,0 @@ -UFile (package = ) - UClass (name = DestructuringDeclarationKt) - UMethod (name = foo) - UParameter (name = data) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = var268d41a5) - UAnnotation (fqName = null) - UBinaryExpression (operator = ) - ULiteralExpression (value = "foo") - ULiteralExpression (value = 1) - ULocalVariable (name = a) - UAnnotation (fqName = null) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = var268d41a5) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component1)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - ULocalVariable (name = b) - UAnnotation (fqName = null) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = var268d41a5) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component2)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - UDeclarationsExpression - ULocalVariable (name = var465978a0) - UAnnotation (fqName = null) - UAnnotation (fqName = kotlin.Suppress) - UNamedExpression (name = names) - ULiteralExpression (value = "UNCHECKED_CAST") - UBinaryExpressionWithType - USimpleNameReferenceExpression (identifier = data) - UTypeReferenceExpression (name = kotlin.Pair) - ULocalVariable (name = k) - UAnnotation (fqName = null) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = var465978a0) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component1)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - ULocalVariable (name = v) - UAnnotation (fqName = null) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = var465978a0) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component2)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) diff --git a/plugins/uast-kotlin/testData/DestructuringDeclaration.render-ide.txt b/plugins/uast-kotlin/testData/DestructuringDeclaration.render-ide.txt deleted file mode 100644 index 03647158190..00000000000 --- a/plugins/uast-kotlin/testData/DestructuringDeclaration.render-ide.txt +++ /dev/null @@ -1,10 +0,0 @@ -public final class DestructuringDeclarationKt { - public static final fun foo(@org.jetbrains.annotations.NotNull data: java.lang.Object) : void { - @null var var268d41a5: = "foo" 1 - @null var a: java.lang.String = var268d41a5.() - @null var b: int = var268d41a5.() - @null @kotlin.Suppress(names = "UNCHECKED_CAST") var var465978a0: = data as kotlin.Pair - @null var k: java.lang.String = var465978a0.() - @null var v: java.lang.String = var465978a0.() - } -} diff --git a/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt b/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt index 754530b1c46..51fead0219e 100644 --- a/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt +++ b/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt @@ -4,15 +4,15 @@ UFile (package = ) [public final class InnerNonFixedTypeVariableKt {...] UParameter (name = list) [@org.jetbrains.annotations.NotNull var list: java.util.List] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] UBlockExpression [{...}] : PsiType: - UQualifiedReferenceExpression [list.filterIsInstance().(mutableSetOf(), { ...})] : PsiType: + UQualifiedReferenceExpression [list.filterIsInstance().(mutableSetOf(), { ...})] : PsiType: UQualifiedReferenceExpression [list.filterIsInstance()] USimpleNameReferenceExpression (identifier = list) [list] : PsiType:List UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [filterIsInstance()] UIdentifier (Identifier (filterIsInstance)) [UIdentifier (Identifier (filterIsInstance))] USimpleNameReferenceExpression (identifier = filterIsInstance, resolvesTo = null) [filterIsInstance] - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) [(mutableSetOf(), { ...})] : PsiType: + UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) [(mutableSetOf(), { ...})] : PsiType: UIdentifier (Identifier (mapTo)) [UIdentifier (Identifier (mapTo))] - USimpleNameReferenceExpression (identifier = , resolvesTo = null) [] : PsiType: + USimpleNameReferenceExpression (identifier = , resolvesTo = null) [] : PsiType: UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [mutableSetOf()] : PsiType:Set UIdentifier (Identifier (mutableSetOf)) [UIdentifier (Identifier (mutableSetOf))] USimpleNameReferenceExpression (identifier = mutableSetOf, resolvesTo = null) [mutableSetOf] : PsiType:Set diff --git a/plugins/uast-kotlin/testData/LambdaReturn.log-ide.txt b/plugins/uast-kotlin/testData/LambdaReturn.log-ide.txt deleted file mode 100644 index 4feec660772..00000000000 --- a/plugins/uast-kotlin/testData/LambdaReturn.log-ide.txt +++ /dev/null @@ -1,140 +0,0 @@ -UFile (package = org.jetbrains.uast.kotlin) - UClass (name = LambdaReturnKt) - UMethod (name = foo) - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = lam1) - ULambdaExpression - UParameter (name = a) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = b) - ULiteralExpression (value = 1) - UReturnExpression - UBinaryExpression (operator = +) - USimpleNameReferenceExpression (identifier = a) - USimpleNameReferenceExpression (identifier = b) - UDeclarationsExpression - ULocalVariable (name = lam2) - ULambdaExpression - UParameter (name = a) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = c) - ULiteralExpression (value = 1) - UReturnExpression - UIfExpression - UBinaryExpression (operator = >) - USimpleNameReferenceExpression (identifier = a) - ULiteralExpression (value = 0) - UBinaryExpression (operator = +) - USimpleNameReferenceExpression (identifier = a) - USimpleNameReferenceExpression (identifier = c) - UBinaryExpression (operator = -) - USimpleNameReferenceExpression (identifier = a) - USimpleNameReferenceExpression (identifier = c) - UDeclarationsExpression - ULocalVariable (name = lam3) - ULabeledExpression (label = lbd) - ULambdaExpression - UParameter (name = a) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = d) - ULiteralExpression (value = 1) - UReturnExpression - UBinaryExpression (operator = +) - USimpleNameReferenceExpression (identifier = a) - USimpleNameReferenceExpression (identifier = d) - UDeclarationsExpression - ULocalVariable (name = lam4) - ULambdaExpression - UParameter (name = a) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UIfExpression - UBinaryExpression (operator = <) - USimpleNameReferenceExpression (identifier = a) - ULiteralExpression (value = 5) - UReturnExpression - ULiteralExpression (value = "5") - UIfExpression - UBinaryExpression (operator = >) - USimpleNameReferenceExpression (identifier = a) - ULiteralExpression (value = 0) - UReturnExpression - ULiteralExpression (value = "1") - UReturnExpression - ULiteralExpression (value = "2") - UDeclarationsExpression - ULocalVariable (name = lam5) - ULambdaExpression - UParameter (name = a) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UReturnExpression - UBinaryExpression (operator = +) - ULiteralExpression (value = "a") - USimpleNameReferenceExpression (identifier = a) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) - UIdentifier (Identifier (bar)) - USimpleNameReferenceExpression (identifier = bar, resolvesTo = null) - ULambdaExpression - UBlockExpression - UIfExpression - UBinaryExpression (operator = >) - USimpleNameReferenceExpression (identifier = it) - ULiteralExpression (value = 5) - UReturnExpression - UDeclarationsExpression - ULocalVariable (name = b) - ULiteralExpression (value = 1) - UReturnExpression - UBinaryExpression (operator = +) - USimpleNameReferenceExpression (identifier = it) - USimpleNameReferenceExpression (identifier = b) - UDeclarationsExpression - ULocalVariable (name = x) - ULambdaExpression - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = vardbcd0724) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) - UIdentifier (Identifier (listOf)) - USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null) - ULiteralExpression (value = 1) - ULiteralExpression (value = 2) - ULocalVariable (name = a) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = vardbcd0724) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component1)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - ULocalVariable (name = b) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = vardbcd0724) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component2)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - UDeclarationsExpression - ULocalVariable (name = y) - ULambdaExpression - UBlockExpression - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) - UIdentifier (Identifier (listOf)) - USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null) - ULiteralExpression (value = 1) - UMethod (name = bar) - UParameter (name = lmbd) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) - UIdentifier (Identifier (lmbd)) - USimpleNameReferenceExpression (identifier = invoke, resolvesTo = null) - ULiteralExpression (value = 1) diff --git a/plugins/uast-kotlin/testData/LambdaReturn.render-ide.txt b/plugins/uast-kotlin/testData/LambdaReturn.render-ide.txt deleted file mode 100644 index 6c03aa8df48..00000000000 --- a/plugins/uast-kotlin/testData/LambdaReturn.render-ide.txt +++ /dev/null @@ -1,44 +0,0 @@ -package org.jetbrains.uast.kotlin - -public final class LambdaReturnKt { - public static final fun foo() : void { - var lam1: kotlin.jvm.functions.Function1 = { @org.jetbrains.annotations.NotNull var a: int -> - - var b: int = 1 - return a + b - } - var lam2: kotlin.jvm.functions.Function1 = { @org.jetbrains.annotations.NotNull var a: int -> - - var c: int = 1 - return if (a > 0) a + c else a - c - } - var lam3: kotlin.jvm.functions.Function1 = lbd@ { @org.jetbrains.annotations.NotNull var a: int -> - - var d: int = 1 - return a + d - } - var lam4: kotlin.jvm.functions.Function1 = fun (@org.jetbrains.annotations.NotNull var a: int) { - if (a < 5) return "5" - if (a > 0) return "1" else return "2" - } - var lam5: kotlin.jvm.functions.Function1 = fun (@org.jetbrains.annotations.NotNull var a: int) { - return "a" + a - } - bar({ - if (it > 5) return - var b: int = 1 - return it + b - }) - var x: kotlin.jvm.functions.Function0 = { - @org.jetbrains.annotations.NotNull var vardbcd0724: = listOf(1, 2) - @org.jetbrains.annotations.NotNull var a: int = vardbcd0724.() - @org.jetbrains.annotations.NotNull var b: int = vardbcd0724.() - } - var y: kotlin.jvm.functions.Function0 = { - listOf(1) - } - } - private static final fun bar(@org.jetbrains.annotations.NotNull lmbd: kotlin.jvm.functions.Function1) : void { - invoke(1) - } -} diff --git a/plugins/uast-kotlin/testData/WhenAndDestructing.log-ide.txt b/plugins/uast-kotlin/testData/WhenAndDestructing.log-ide.txt deleted file mode 100644 index 061131ed262..00000000000 --- a/plugins/uast-kotlin/testData/WhenAndDestructing.log-ide.txt +++ /dev/null @@ -1,45 +0,0 @@ -UFile (package = ) - UClass (name = WhenAndDestructingKt) - UMethod (name = getElementsAdditionalResolve) - UParameter (name = string) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) - UBlockExpression - UDeclarationsExpression - ULocalVariable (name = arr) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) - UIdentifier (Identifier (listOf)) - USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null) - ULiteralExpression (value = "1") - ULiteralExpression (value = "2") - USwitchExpression - USimpleNameReferenceExpression (identifier = string) - UExpressionList (when) - USwitchClauseExpressionWithBody - ULiteralExpression (value = "aaaa") - UExpressionList (when_entry) - UReturnExpression - ULiteralExpression (value = "bindingContext") - UBreakExpression (label = null) - USwitchClauseExpressionWithBody - UExpressionList (when_entry) - UDeclarationsExpression - ULocalVariable (name = var837f1e82) - UAnnotation (fqName = null) - USimpleNameReferenceExpression (identifier = arr) - ULocalVariable (name = bindingContext) - UAnnotation (fqName = null) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = var837f1e82) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component1)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - ULocalVariable (name = statementFilter) - UAnnotation (fqName = null) - UQualifiedReferenceExpression - USimpleNameReferenceExpression (identifier = var837f1e82) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (component2)) - USimpleNameReferenceExpression (identifier = , resolvesTo = null) - UReturnExpression - USimpleNameReferenceExpression (identifier = bindingContext) - UBreakExpression (label = null) diff --git a/plugins/uast-kotlin/testData/WhenAndDestructing.render-ide.txt b/plugins/uast-kotlin/testData/WhenAndDestructing.render-ide.txt deleted file mode 100644 index f3e37e879f8..00000000000 --- a/plugins/uast-kotlin/testData/WhenAndDestructing.render-ide.txt +++ /dev/null @@ -1,21 +0,0 @@ -public final class WhenAndDestructingKt { - public static final fun getElementsAdditionalResolve(@org.jetbrains.annotations.NotNull string: java.lang.String) : java.lang.String { - var arr: java.util.List = listOf("1", "2") - switch (string) { - "aaaa" -> { - return "bindingContext" - break - } - - -> { - @null var var837f1e82: = arr - @null var bindingContext: java.lang.String = var837f1e82.() - @null var statementFilter: java.lang.String = var837f1e82.() - return bindingContext - break - } - - } - - } -}