diff --git a/compiler/testData/cfg/arrays/ArrayAccess.instructions b/compiler/testData/cfg/arrays/ArrayAccess.instructions index d0a9fad7a73..d2018216a83 100644 --- a/compiler/testData/cfg/arrays/ArrayAccess.instructions +++ b/compiler/testData/cfg/arrays/ArrayAccess.instructions @@ -1,6 +1,5 @@ == foo == -fun foo() { - val a = Array +fun foo(a: Array) { 3 a[10] = 4 2 @@ -11,11 +10,10 @@ fun foo() { --------------------- L0: 1 - 2 mark({ val a = Array 3 a[10] = 4 2 a[10] 100 a[10] += 1 }) - v(val a = Array) - mark(Array) - call(Array, ) -> + v(a: Array) + magic[FAKE_INITIALIZER](a: Array) -> w(a|) + 2 mark({ 3 a[10] = 4 2 a[10] 100 a[10] += 1 }) r(3) -> mark(a[10]) r(a) -> @@ -41,9 +39,9 @@ L0: r(10) -> call(a[10] += 1, set|, , ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== \ No newline at end of file diff --git a/compiler/testData/cfg/arrays/ArrayAccess.kt b/compiler/testData/cfg/arrays/ArrayAccess.kt index 280e8762cae..c16842e7f4f 100644 --- a/compiler/testData/cfg/arrays/ArrayAccess.kt +++ b/compiler/testData/cfg/arrays/ArrayAccess.kt @@ -1,5 +1,4 @@ -fun foo() { - val a = Array +fun foo(a: Array) { 3 a[10] = 4 2 diff --git a/compiler/testData/cfg/arrays/ArrayAccess.values b/compiler/testData/cfg/arrays/ArrayAccess.values index a9cc8964bbd..c5c218d78c6 100644 --- a/compiler/testData/cfg/arrays/ArrayAccess.values +++ b/compiler/testData/cfg/arrays/ArrayAccess.values @@ -1,6 +1,5 @@ == foo == -fun foo() { - val a = Array +fun foo(a: Array) { 3 a[10] = 4 2 @@ -9,21 +8,21 @@ fun foo() { a[10] += 1 } --------------------- -Array : {<: Array} NEW: call(Array, ) -> -3 : * NEW: r(3) -> -a : {<: Array} NEW: r(a) -> -10 : Int NEW: r(10) -> -4 : Int NEW: r(4) -> -a[10] = 4 : * NEW: call(a[10] = 4, set|, , ) -> -2 : * NEW: r(2) -> -a : {<: Array} NEW: r(a) -> -10 : Int NEW: r(10) -> -a[10] : * NEW: call(a[10], get|, ) -> -100 : * NEW: r(100) -> -a : {<: Array} NEW: r(a) -> -10 : Int NEW: r(10) -> -a[10] : Int NEW: call(a[10], get|, ) -> -1 : Int NEW: r(1) -> -a[10] += 1 : * NEW: call(a[10] += 1, set|, , ) -> -{ val a = Array 3 a[10] = 4 2 a[10] 100 a[10] += 1 } : * COPY + : {<: Array} NEW: magic[FAKE_INITIALIZER](a: Array) -> +3 : * NEW: r(3) -> +a : {<: Array} NEW: r(a) -> +10 : Int NEW: r(10) -> +4 : Int NEW: r(4) -> +a[10] = 4 : * NEW: call(a[10] = 4, set|, , ) -> +2 : * NEW: r(2) -> +a : {<: Array} NEW: r(a) -> +10 : Int NEW: r(10) -> +a[10] : * NEW: call(a[10], get|, ) -> +100 : * NEW: r(100) -> +a : {<: Array} NEW: r(a) -> +10 : Int NEW: r(10) -> +a[10] : Int NEW: call(a[10], get|, ) -> +1 : Int NEW: r(1) -> +a[10] += 1 : * NEW: call(a[10] += 1, set|, , ) -> +{ 3 a[10] = 4 2 a[10] 100 a[10] += 1 } : * COPY ===================== diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt index 38c05558895..429cef9e6e5 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt @@ -1,6 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! - fun bar(x: Int): Int = x + 1 fun foo() { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.txt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.txt index 24bc91e6ad1..bb90ad2839e 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.txt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.txt @@ -1,5 +1,4 @@ package -public inline fun Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array public fun bar(/*0*/ x: kotlin.Int): kotlin.Int public fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt index ea9e257e1f5..0589735a2ef 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt @@ -1,6 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! - fun bar(x: Int): Int = x + 1 fun foo() { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.txt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.txt index 24bc91e6ad1..bb90ad2839e 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.txt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.txt @@ -1,5 +1,4 @@ package -public inline fun Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array public fun bar(/*0*/ x: kotlin.Int): kotlin.Int public fun foo(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt b/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt index f239828d1e2..ee5966fe5f2 100644 --- a/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt +++ b/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt @@ -1,8 +1,5 @@ // !CHECK_TYPE -@Suppress("UNCHECKED_CAST") -fun arrayOf(vararg t : T) : Array = t as Array - fun test() { val array = arrayOf(arrayOf(1)) array checkType { _>>() } diff --git a/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.txt b/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.txt index 6e40915d38f..93e27f34c8c 100644 --- a/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.txt +++ b/compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.txt @@ -1,4 +1,3 @@ package -@kotlin.Suppress(names = {"UNCHECKED_CAST"}) public fun arrayOf(/*0*/ vararg t: T /*kotlin.Array*/): kotlin.Array public fun test(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/labels/kt1703.kt b/compiler/testData/diagnostics/tests/labels/kt1703.kt index bd0c7591f29..b920ce9b2b2 100644 --- a/compiler/testData/diagnostics/tests/labels/kt1703.kt +++ b/compiler/testData/diagnostics/tests/labels/kt1703.kt @@ -1,6 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! - //KT-1703 Reference to label is unresolved fun test() { diff --git a/compiler/testData/diagnostics/tests/labels/kt1703.txt b/compiler/testData/diagnostics/tests/labels/kt1703.txt index 81c6e7fe6d4..58886b11fe7 100644 --- a/compiler/testData/diagnostics/tests/labels/kt1703.txt +++ b/compiler/testData/diagnostics/tests/labels/kt1703.txt @@ -1,6 +1,5 @@ package -public inline fun Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array public fun test(): kotlin.Unit public fun use(/*0*/ a: kotlin.Any?): kotlin.Any? public fun kotlin.Array.forEach(/*0*/ operation: (T) -> kotlin.Unit): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/modifiers/const/types.kt b/compiler/testData/diagnostics/tests/modifiers/const/types.kt index aa49bfdf35e..e507f758c44 100644 --- a/compiler/testData/diagnostics/tests/modifiers/const/types.kt +++ b/compiler/testData/diagnostics/tests/modifiers/const/types.kt @@ -10,7 +10,3 @@ enum class MyEnum { A } const val enumConst: MyEnum = MyEnum.A const val arrayConst: Array = arrayOf("1") const val intArrayConst: IntArray = intArrayOf() - -// ------------------------------------------------ -fun arrayOf(vararg x: T): Array = null!! -fun intArrayOf(): IntArray = null!! \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/modifiers/const/types.txt b/compiler/testData/diagnostics/tests/modifiers/const/types.txt index d06c2847882..855b456c754 100644 --- a/compiler/testData/diagnostics/tests/modifiers/const/types.txt +++ b/compiler/testData/diagnostics/tests/modifiers/const/types.txt @@ -7,8 +7,6 @@ public const val intArrayConst: kotlin.IntArray public const val intConst: kotlin.Int = 1 public const val longConst: kotlin.Long = 1.toLong() public const val stringConst: kotlin.String = "empty" -public fun arrayOf(/*0*/ vararg x: T /*kotlin.Array*/): kotlin.Array -public fun intArrayOf(): kotlin.IntArray public final enum class MyEnum : kotlin.Enum { enum entry A diff --git a/compiler/testData/diagnostics/tests/regressions/kt312.kt b/compiler/testData/diagnostics/tests/regressions/kt312.kt index b6ebf389e72..ca5329d02c2 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt312.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt312.kt @@ -1,6 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! - // KT-312 Nullability problem when a nullable version of a generic type is returned fun Array.safeGet(index : Int) : T? { diff --git a/compiler/testData/diagnostics/tests/regressions/kt312.txt b/compiler/testData/diagnostics/tests/regressions/kt312.txt index b7649d72ea8..96a351246a6 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt312.txt +++ b/compiler/testData/diagnostics/tests/regressions/kt312.txt @@ -3,5 +3,4 @@ package public val args: kotlin.Array public val name: kotlin.String public val name1: kotlin.String? -public inline fun Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array public fun kotlin.Array.safeGet(/*0*/ index: kotlin.Int): T? diff --git a/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt b/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt index 9a3513f1316..d0243dbe5e1 100644 --- a/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt +++ b/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt @@ -1,6 +1,3 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! - class A { operator fun component1() = 42 operator fun component2() = 42 diff --git a/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.txt b/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.txt index 2733fc2e80f..0fe88318e8b 100644 --- a/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.txt +++ b/compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.txt @@ -1,6 +1,5 @@ package -public inline fun Array(/*0*/ n: kotlin.Int, /*1*/ block: (kotlin.Int) -> T): kotlin.Array public fun foo(/*0*/ a: A, /*1*/ c: kotlin.Int): kotlin.Unit public final class A { diff --git a/idea/idea-completion/testData/weighers/basic/LocalsPropertiesKeywords.kt b/idea/idea-completion/testData/weighers/basic/LocalsPropertiesKeywords.kt index 4dae3796958..8aa74430b68 100644 --- a/idea/idea-completion/testData/weighers/basic/LocalsPropertiesKeywords.kt +++ b/idea/idea-completion/testData/weighers/basic/LocalsPropertiesKeywords.kt @@ -1,6 +1,6 @@ fun test(fals: Int) { val falt = 111 - fa + fal } // ORDER: fals, falt, false \ No newline at end of file diff --git a/idea/idea-completion/testData/weighers/basic/ParametersBeforeKeywords.kt b/idea/idea-completion/testData/weighers/basic/ParametersBeforeKeywords.kt index 6b833b4be2d..a4403c50e0e 100644 --- a/idea/idea-completion/testData/weighers/basic/ParametersBeforeKeywords.kt +++ b/idea/idea-completion/testData/weighers/basic/ParametersBeforeKeywords.kt @@ -1,5 +1,6 @@ -fun bar(fop: Int) { - fo +fun bar(breach: Int) { + while (true) + bre } -// ORDER: fop, for \ No newline at end of file +// ORDER: breach, break \ No newline at end of file diff --git a/idea/testData/codeInsight/overrideImplement/sameTypeName/foo/Impl.kt.after b/idea/testData/codeInsight/overrideImplement/sameTypeName/foo/Impl.kt.after index f0510220e06..a66e44f7fcd 100644 --- a/idea/testData/codeInsight/overrideImplement/sameTypeName/foo/Impl.kt.after +++ b/idea/testData/codeInsight/overrideImplement/sameTypeName/foo/Impl.kt.after @@ -1,4 +1,3 @@ -// ERROR: Unresolved reference: emptyArray //KT-1602 import lib.ArrayFactory diff --git a/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt b/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt index cc68c95a0de..b4141791cb6 100644 --- a/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt +++ b/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt @@ -1,4 +1,3 @@ -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! fun foo(i: Int) { Array(1, { 42 })[(i + i)] } diff --git a/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt.after b/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt.after index f19a44acf09..1a6428284ce 100644 --- a/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt.after +++ b/idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt.after @@ -1,4 +1,3 @@ -public inline fun Array(n: Int, block: (Int) -> T): Array = null!! fun foo(i: Int) { Array(1, { 42 })[i + i] }