diff --git a/compiler/testData/codegen/box/arrays/cloneArray.kt b/compiler/testData/codegen/box/arrays/cloneArray.kt index 141721f181f..8e29271c7d7 100644 --- a/compiler/testData/codegen/box/arrays/cloneArray.kt +++ b/compiler/testData/codegen/box/arrays/cloneArray.kt @@ -1,17 +1,17 @@ // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS -import java.util.Arrays.equals +// WITH_RUNTIME fun box(): String { val s = arrayOf("live", "long") val t: Array = s.clone() - if (!equals(s, t)) return "Fail string" + if (!(s contentEquals t)) return "Fail string" if (s === t) return "Fail string identity" val ss = arrayOf(s, s) val tt: Array> = ss.clone() - if (!equals(ss, tt)) return "Fail string[]" + if (!(ss contentEquals tt)) return "Fail string[]" if (ss === tt) return "Fail string[] identity" return "OK" diff --git a/compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt b/compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt index a49224083bd..dc6646587d6 100644 --- a/compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt +++ b/compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt @@ -1,39 +1,39 @@ // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS -import java.util.Arrays.equals +// WITH_RUNTIME fun box(): String { val i = intArrayOf(1, 2) - if (!equals(i, i.clone())) return "Fail int" + if (!(i contentEquals i.clone())) return "Fail int" if (i.clone() === i) return "Fail int identity" val j = longArrayOf(1L, 2L) - if (!equals(j, j.clone())) return "Fail long" + if (!(j contentEquals j.clone())) return "Fail long" if (j.clone() === j) return "Fail long identity" val s = shortArrayOf(1.toShort(), 2.toShort()) - if (!equals(s, s.clone())) return "Fail short" + if (!(s contentEquals s.clone())) return "Fail short" if (s.clone() === s) return "Fail short identity" val b = byteArrayOf(1.toByte(), 2.toByte()) - if (!equals(b, b.clone())) return "Fail byte" + if (!(b contentEquals b.clone())) return "Fail byte" if (b.clone() === b) return "Fail byte identity" val c = charArrayOf('a', 'b') - if (!equals(c, c.clone())) return "Fail char" + if (!(c contentEquals c.clone())) return "Fail char" if (c.clone() === c) return "Fail char identity" val d = doubleArrayOf(1.0, -1.0) - if (!equals(d, d.clone())) return "Fail double" + if (!(d contentEquals d.clone())) return "Fail double" if (d.clone() === d) return "Fail double identity" val f = floatArrayOf(1f, -1f) - if (!equals(f, f.clone())) return "Fail float" + if (!(f contentEquals f.clone())) return "Fail float" if (f.clone() === f) return "Fail float identity" val z = booleanArrayOf(true, false) - if (!equals(z, z.clone())) return "Fail boolean" + if (!(z contentEquals z.clone())) return "Fail boolean" if (z.clone() === z) return "Fail boolean identity" return "OK" diff --git a/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt b/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt index 2683bc64379..974b55f66a5 100644 --- a/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt +++ b/compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - operator fun ArrayList.get(index1: Int, index2: Int) = this[index1 + index2] operator fun ArrayList.set(index1: Int, index2: Int, elem: String) { this[index1 + index2] = elem diff --git a/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt b/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt index 471574c442d..295f860f84a 100644 --- a/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt +++ b/compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - operator fun ArrayList.get(index1: Int, index2: Int) = this[index1 + index2] operator fun ArrayList.set(index1: Int, index2: Int, elem: String) { this[index1 + index2] = elem diff --git a/compiler/testData/codegen/box/arrays/hashMap.kt b/compiler/testData/codegen/box/arrays/hashMap.kt index cfc6843a144..9c04d4911d6 100644 --- a/compiler/testData/codegen/box/arrays/hashMap.kt +++ b/compiler/testData/codegen/box/arrays/hashMap.kt @@ -1,5 +1,3 @@ -import java.util.HashMap - operator fun HashMap.set(index: String, elem: Int?) { this.put(index, elem) } diff --git a/compiler/testData/codegen/box/arrays/kt33.kt b/compiler/testData/codegen/box/arrays/kt33.kt index 8ae98aa541d..25941e0f5cd 100644 --- a/compiler/testData/codegen/box/arrays/kt33.kt +++ b/compiler/testData/codegen/box/arrays/kt33.kt @@ -1,5 +1,5 @@ fun box () : String { - val s = java.util.ArrayList() + val s = ArrayList() s.add("foo") s[0] += "bar" return if(s[0] == "foobar") "OK" else "fail" diff --git a/compiler/testData/codegen/box/arrays/kt950.kt b/compiler/testData/codegen/box/arrays/kt950.kt index aa8a03ce3c5..f9d26d44d43 100644 --- a/compiler/testData/codegen/box/arrays/kt950.kt +++ b/compiler/testData/codegen/box/arrays/kt950.kt @@ -1,5 +1,3 @@ -import java.util.* - operator fun MutableMap.set(k : K, v : V) = put(k, v) fun box() : String { diff --git a/compiler/testData/codegen/box/bridges/complexTraitImpl.kt b/compiler/testData/codegen/box/bridges/complexTraitImpl.kt index 3825e74b181..dafbf0a5961 100644 --- a/compiler/testData/codegen/box/bridges/complexTraitImpl.kt +++ b/compiler/testData/codegen/box/bridges/complexTraitImpl.kt @@ -1,9 +1,8 @@ // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS - -import java.util.ArrayList import java.util.Arrays + abstract class A { abstract fun foo(): List } diff --git a/compiler/testData/codegen/box/bridges/delegationComplexWithList.kt b/compiler/testData/codegen/box/bridges/delegationComplexWithList.kt index 9474ef1edad..caf8be2c5dd 100644 --- a/compiler/testData/codegen/box/bridges/delegationComplexWithList.kt +++ b/compiler/testData/codegen/box/bridges/delegationComplexWithList.kt @@ -1,4 +1,4 @@ -import java.util.* +// WITH_RUNTIME open class Content() { override fun toString() = "OK" diff --git a/compiler/testData/codegen/box/bridges/kt2498.kt b/compiler/testData/codegen/box/bridges/kt2498.kt index b50fd235d56..7d0feab1058 100644 --- a/compiler/testData/codegen/box/bridges/kt2498.kt +++ b/compiler/testData/codegen/box/bridges/kt2498.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - open class BaseStringList: ArrayList() { } diff --git a/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt b/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt index d321d0726bd..9b1cf547db0 100644 --- a/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt +++ b/compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt @@ -1,7 +1,5 @@ // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS - -import java.util.ArrayList import java.util.Arrays interface A { diff --git a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt index 78cd670b04a..bb2b1ec5b0a 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt @@ -1,5 +1,3 @@ -import java.util.HashSet - class A : HashSet() fun box(): String { diff --git a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt index 8cb8e547f7f..9a18322f4a8 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt @@ -1,7 +1,5 @@ // KT-6042 java.lang.UnsupportedOperationException with ArrayList -import java.util.ArrayList - class A : ArrayList() fun box(): String { diff --git a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt index 047a105083f..2c63371c63c 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt @@ -1,5 +1,3 @@ -import java.util.HashMap - class A : HashMap() fun box(): String { diff --git a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt index 78cd670b04a..bb2b1ec5b0a 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt @@ -1,5 +1,3 @@ -import java.util.HashSet - class A : HashSet() fun box(): String { diff --git a/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt b/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt index 346ed763d19..84e3b531630 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt @@ -1,8 +1,6 @@ // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS -import java.util.ArrayList - class MyCollection : Collection>> { override fun iterator() = null!! override val size: Int get() = null!! diff --git a/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt b/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt index ec1ac3d0d88..a54ad8b239f 100644 --- a/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt +++ b/compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME -import java.util.* - class Itr : Iterator by ArrayList().iterator() class MItr : MutableIterator by ArrayList().iterator() class LItr : ListIterator by ArrayList().listIterator() diff --git a/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt b/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt index dce4e5da005..1bdc245676f 100644 --- a/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt +++ b/compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt @@ -1,5 +1,3 @@ -import java.util.HashSet - interface A : Set class B : A, HashSet() diff --git a/compiler/testData/codegen/box/classes/kt1538.kt b/compiler/testData/codegen/box/classes/kt1538.kt index 0e458c69c27..e412b9885e3 100644 --- a/compiler/testData/codegen/box/classes/kt1538.kt +++ b/compiler/testData/codegen/box/classes/kt1538.kt @@ -1,5 +1,3 @@ -import java.util.HashMap - data class Pair(val first: First, val second: Second) fun parseCatalogs(hashMap: Any?) { diff --git a/compiler/testData/codegen/box/classes/kt1980.kt b/compiler/testData/codegen/box/classes/kt1980.kt index a69274619ff..74414304f25 100644 --- a/compiler/testData/codegen/box/classes/kt1980.kt +++ b/compiler/testData/codegen/box/classes/kt1980.kt @@ -1,5 +1,3 @@ -import java.util.* - public inline fun Int.times(body : () -> Unit) { var count = this; while (count > 0) { diff --git a/compiler/testData/codegen/box/classes/kt2417.kt b/compiler/testData/codegen/box/classes/kt2417.kt index bf1fa375e2c..fe584cce56a 100644 --- a/compiler/testData/codegen/box/classes/kt2417.kt +++ b/compiler/testData/codegen/box/classes/kt2417.kt @@ -1,5 +1,3 @@ -import java.util.HashSet - fun box() : String{ val set = HashSet() set.add("foo") diff --git a/compiler/testData/codegen/box/classes/kt343.kt b/compiler/testData/codegen/box/classes/kt343.kt index 43428768d70..adae992ae21 100644 --- a/compiler/testData/codegen/box/classes/kt343.kt +++ b/compiler/testData/codegen/box/classes/kt343.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - fun launch(f : () -> Unit) { f() } diff --git a/compiler/testData/codegen/box/classes/kt903.kt b/compiler/testData/codegen/box/classes/kt903.kt index 58e6e5e53e5..5c3e51cbe41 100644 --- a/compiler/testData/codegen/box/classes/kt903.kt +++ b/compiler/testData/codegen/box/classes/kt903.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - operator fun Int.plus(a: Int?) = this + a!! public open class PerfectNumberFinder() { diff --git a/compiler/testData/codegen/box/classes/kt940.kt b/compiler/testData/codegen/box/classes/kt940.kt index a81d971ffba..f9e99b3716a 100644 --- a/compiler/testData/codegen/box/classes/kt940.kt +++ b/compiler/testData/codegen/box/classes/kt940.kt @@ -1,4 +1,4 @@ -import java.util.* +// WITH_RUNTIME fun box() : String { val w = object : Comparator { diff --git a/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt b/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt index 551d1cd67ca..2333984acfa 100644 --- a/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt +++ b/compiler/testData/codegen/box/classes/overloadBinaryOperator.kt @@ -1,5 +1,3 @@ -import java.util.* - class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadPlusAssign.kt b/compiler/testData/codegen/box/classes/overloadPlusAssign.kt index b37640eac0c..04fa8c842ca 100644 --- a/compiler/testData/codegen/box/classes/overloadPlusAssign.kt +++ b/compiler/testData/codegen/box/classes/overloadPlusAssign.kt @@ -1,5 +1,3 @@ -import java.util.* - class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt b/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt index 48368b15dfb..005c69ce4f9 100644 --- a/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt +++ b/compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt @@ -1,5 +1,3 @@ -import java.util.* - class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt b/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt index 48368b15dfb..005c69ce4f9 100644 --- a/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt +++ b/compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt @@ -1,5 +1,3 @@ -import java.util.* - class ArrayWrapper() { val contents = ArrayList() diff --git a/compiler/testData/codegen/box/controlStructures/continueInFor.kt b/compiler/testData/codegen/box/controlStructures/continueInFor.kt index a4f24ea459a..7d5bb6a3dc4 100644 --- a/compiler/testData/codegen/box/controlStructures/continueInFor.kt +++ b/compiler/testData/codegen/box/controlStructures/continueInFor.kt @@ -30,7 +30,7 @@ fun for_long_range(): Int { } fun for_int_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) var c = 0 @@ -42,7 +42,7 @@ fun for_int_list(): Int { } fun for_byte_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) var c = 0 @@ -54,7 +54,7 @@ fun for_byte_list(): Int { } fun for_long_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) var c = 0 @@ -66,7 +66,7 @@ fun for_long_list(): Int { } fun for_double_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) var c = 0 @@ -78,7 +78,7 @@ fun for_double_list(): Int { } fun for_object_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) var c = 0 diff --git a/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt b/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt index 82be0f78314..fe644d6e64b 100644 --- a/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt +++ b/compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt @@ -30,7 +30,7 @@ fun for_long_range(): Int { } fun for_int_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) var c = 0 @@ -42,7 +42,7 @@ fun for_int_list(): Int { } fun for_byte_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) var c = 0 @@ -54,7 +54,7 @@ fun for_byte_list(): Int { } fun for_long_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) a.add(0); a.add(0); a.add(0); a.add(0); a.add(0) var c = 0 @@ -66,7 +66,7 @@ fun for_long_list(): Int { } fun for_double_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) var c = 0 @@ -78,7 +78,7 @@ fun for_double_list(): Int { } fun for_object_list(): Int { - val a = java.util.ArrayList() + val a = ArrayList() a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0); a.add(0.0) var c = 0 diff --git a/compiler/testData/codegen/box/controlStructures/kt910.kt b/compiler/testData/codegen/box/controlStructures/kt910.kt index b4317a88821..a9226bbdba2 100644 --- a/compiler/testData/codegen/box/controlStructures/kt910.kt +++ b/compiler/testData/codegen/box/controlStructures/kt910.kt @@ -1,5 +1,3 @@ -import java.util.HashSet - fun foo() : Int = try { 2 diff --git a/compiler/testData/codegen/box/coroutines/handleException.kt b/compiler/testData/codegen/box/coroutines/handleException.kt index c1e5140c003..8551260ffc6 100644 --- a/compiler/testData/codegen/box/coroutines/handleException.kt +++ b/compiler/testData/codegen/box/coroutines/handleException.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME class Controller { var exception: Throwable? = null - val postponedActions = java.util.ArrayList<() -> Unit>() + val postponedActions = ArrayList<() -> Unit>() suspend fun suspendWithValue(v: String, x: Continuation) { postponedActions.add { diff --git a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt index f2c991e8ec9..1475c7aec62 100644 --- a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt +++ b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt @@ -2,7 +2,7 @@ var globalResult = "" var wasCalled = false class Controller { - val postponedActions = java.util.ArrayList<() -> Unit>() + val postponedActions = ArrayList<() -> Unit>() suspend fun suspendWithValue(v: String, x: Continuation) { postponedActions.add { diff --git a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt index 1bd9e4958fa..67759e8ca84 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt @@ -2,7 +2,7 @@ var globalResult = "" var wasCalled = false class Controller { - val postponedActions = java.util.ArrayList<() -> Unit>() + val postponedActions = ArrayList<() -> Unit>() suspend fun suspendWithValue(v: String, x: Continuation) { postponedActions.add { diff --git a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt index 55c898531b3..0d22aec8bb1 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt @@ -2,7 +2,7 @@ var globalResult = "" var wasCalled = false class Controller { - val postponedActions = java.util.ArrayList<() -> Unit>() + val postponedActions = ArrayList<() -> Unit>() suspend fun suspendWithValue(v: String, x: Continuation) { postponedActions.add { diff --git a/compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt b/compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt index bb765c93e1d..dd49cb336dd 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt @@ -1,6 +1,5 @@ //WITH_REFLECT -import java.util.* import kotlin.properties.Delegates fun box(): String { diff --git a/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt b/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt index 48039e88e5b..f457e44dafc 100644 --- a/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt +++ b/compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt @@ -1,7 +1,6 @@ // WITH_REFLECT // TODO: replace with WITH_RUNTIME once KT-11316 is fixed -import java.util.* import kotlin.reflect.* val properties = HashSet>() diff --git a/compiler/testData/codegen/box/extensionFunctions/kt865.kt b/compiler/testData/codegen/box/extensionFunctions/kt865.kt index e47732b2c73..b461ec16a08 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt865.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt865.kt @@ -1,5 +1,3 @@ -import java.util.* - class Template() { val collected = ArrayList() diff --git a/compiler/testData/codegen/box/functions/invoke/kt3190.kt b/compiler/testData/codegen/box/functions/invoke/kt3190.kt index c8558942a69..17c2e94db49 100644 --- a/compiler/testData/codegen/box/functions/invoke/kt3190.kt +++ b/compiler/testData/codegen/box/functions/invoke/kt3190.kt @@ -6,7 +6,7 @@ fun box(): String { } class Cached(private val generate: (K)->V): Function1 { - val store = java.util.HashMap() + val store = HashMap() // Everything works just fine if 'invoke' method is renamed to, for example, 'get' override fun invoke(p1: K) = store.getOrPut(p1) { generate(p1) } diff --git a/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt b/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt index 1129a64b623..93d22ce72d0 100644 --- a/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt +++ b/compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt @@ -1,5 +1,5 @@ fun box(): String { - val list = java.util.ArrayList() + val list = ArrayList() list.add(1..3) list[0].start return "OK" diff --git a/compiler/testData/codegen/box/intrinsics/stringFromCollection.kt b/compiler/testData/codegen/box/intrinsics/stringFromCollection.kt index daacb2d0131..bd15b7bf3f3 100644 --- a/compiler/testData/codegen/box/intrinsics/stringFromCollection.kt +++ b/compiler/testData/codegen/box/intrinsics/stringFromCollection.kt @@ -1,5 +1,5 @@ fun box(): String { - val list = java.util.ArrayList() + val list = ArrayList() list.add("0") list[0][0] list[0].length diff --git a/compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt b/compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt index abc4371f18d..c39287e7d2b 100644 --- a/compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt +++ b/compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt @@ -1,4 +1,3 @@ -import java.util.HashMap fun foo(k: K, v: V) { val map = HashMap() diff --git a/compiler/testData/codegen/box/jdk/arrayList.kt b/compiler/testData/codegen/box/jdk/arrayList.kt index d594b1bd20e..54a5b35886e 100644 --- a/compiler/testData/codegen/box/jdk/arrayList.kt +++ b/compiler/testData/codegen/box/jdk/arrayList.kt @@ -1,4 +1,3 @@ -import java.util.ArrayList fun box(): String { val a = ArrayList() diff --git a/compiler/testData/codegen/box/jdk/hashMap.kt b/compiler/testData/codegen/box/jdk/hashMap.kt index d36c884ae62..3574e445e4c 100644 --- a/compiler/testData/codegen/box/jdk/hashMap.kt +++ b/compiler/testData/codegen/box/jdk/hashMap.kt @@ -1,4 +1,3 @@ -import java.util.* fun box(): String { val map: MutableMap = HashMap() diff --git a/compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt b/compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt index 3273fc1d2a3..c53bd2d9b6f 100644 --- a/compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt +++ b/compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt @@ -1,4 +1,3 @@ -import java.util.HashMap fun box() : String { if (!testIteratingOverMap1()) return "fail 1" diff --git a/compiler/testData/codegen/box/jdk/kt1397.kt b/compiler/testData/codegen/box/jdk/kt1397.kt index 834d543942f..17130d18c96 100644 --- a/compiler/testData/codegen/box/jdk/kt1397.kt +++ b/compiler/testData/codegen/box/jdk/kt1397.kt @@ -1,4 +1,3 @@ -import java.util.ArrayList class IntArrayList(): ArrayList() { override fun get(index: Int): Int = super.get(index) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt index 411cbb7f59c..d3fce253d5a 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt @@ -3,7 +3,7 @@ class C(val i: Int) { operator fun component2() = i + 2 } -fun doTest(l : java.util.ArrayList): String { +fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -12,7 +12,7 @@ fun doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(C(0)) l.add(C(1)) l.add(C(2)) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt index ae80ff2a341..fb470307de3 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt @@ -4,7 +4,7 @@ class C(val i: Int) { operator fun C.component1() = i + 1 operator fun C.component2() = i + 2 -fun doTest(l : java.util.ArrayList): String { +fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -13,7 +13,7 @@ fun doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(C(0)) l.add(C(1)) l.add(C(2)) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt index dc38e0cea5b..344e2051fc9 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt @@ -5,7 +5,7 @@ class M { operator fun C.component1() = i + 1 operator fun C.component2() = i + 2 - fun doTest(l : java.util.ArrayList): String { + fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -15,7 +15,7 @@ class M { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(C(0)) l.add(C(1)) l.add(C(2)) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index f19c994c14b..2b223cd505e 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -6,7 +6,7 @@ class M { operator fun C.component2() = i + 2 } -fun M.doTest(l : java.util.ArrayList): String { +fun M.doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -15,7 +15,7 @@ fun M.doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(C(0)) l.add(C(1)) l.add(C(2)) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt index 65714b836d8..a744e0370ee 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt @@ -3,7 +3,7 @@ class C(val i: Int) { operator fun component2() = i + 2 } -fun doTest(l : java.util.ArrayList): String { +fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += {"$a:$b;"}() @@ -12,7 +12,7 @@ fun doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(C(0)) l.add(C(1)) l.add(C(2)) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt index ba96b495179..e9facb62192 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt @@ -1,7 +1,7 @@ operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 -fun doTest(l : java.util.ArrayList): String { +fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -10,7 +10,7 @@ fun doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(0) l.add(1) l.add(2) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt index 3c6808a08b5..7afc1023d61 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,7 +1,7 @@ operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 -fun doTest(l : java.util.ArrayList): String { +fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += {"$a:$b;"}() @@ -10,7 +10,7 @@ fun doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(0) l.add(1) l.add(2) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt index 2161ea8709e..499b2e18356 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt @@ -2,7 +2,7 @@ class M { operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 - fun doTest(l : java.util.ArrayList): String { + fun doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -12,7 +12,7 @@ class M { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(0) l.add(1) l.add(2) diff --git a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt index 0515fd60bc4..b20eb9d7453 100644 --- a/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt +++ b/compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt @@ -3,7 +3,7 @@ class M { operator fun Long.component2() = this + 2 } -fun M.doTest(l : java.util.ArrayList): String { +fun M.doTest(l : ArrayList): String { var s = "" for ((a, b) in l) { s += "$a:$b;" @@ -12,7 +12,7 @@ fun M.doTest(l : java.util.ArrayList): String { } fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(0) l.add(1) l.add(2) diff --git a/compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt b/compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt index cfc3732417f..8793aef1b14 100644 --- a/compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt +++ b/compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME -import java.util.* - fun box(): String { val hashMap = HashMap() hashMap.put("one", 1) diff --git a/compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt b/compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt index 2a91e67bd22..c59e782da64 100644 --- a/compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt +++ b/compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt @@ -1,4 +1,3 @@ -import java.util.HashMap object O { val mmmap = HashMap(); diff --git a/compiler/testData/codegen/box/platformTypes/primitives/assign.kt b/compiler/testData/codegen/box/platformTypes/primitives/assign.kt index d1671cc5688..97730470dfc 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/assign.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/assign.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) var x = l[0] x = 2 diff --git a/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt b/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt index c3f04bc29ab..288a8111d76 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0] < 2 if (x != true) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/dec.kt b/compiler/testData/codegen/box/platformTypes/primitives/dec.kt index d06a348faa3..04574676e01 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/dec.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/dec.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) var x = l[0] var y = l[0] diff --git a/compiler/testData/codegen/box/platformTypes/primitives/div.kt b/compiler/testData/codegen/box/platformTypes/primitives/div.kt index f6eef0bc9b8..1d19aa08bde 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/div.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/div.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(2) val x = l[0] / 2 if (x != 1) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/equals.kt b/compiler/testData/codegen/box/platformTypes/primitives/equals.kt index d1316f6cbff..f11e683d8cf 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/equals.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/equals.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0] == 2 if (x != false) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt b/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt index 026c3f99179..884ce0f7752 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0].hashCode() if (x != 1) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/inc.kt b/compiler/testData/codegen/box/platformTypes/primitives/inc.kt index 30883950ec3..25de0090050 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/inc.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/inc.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) var x = l[0] var y = l[0] diff --git a/compiler/testData/codegen/box/platformTypes/primitives/minus.kt b/compiler/testData/codegen/box/platformTypes/primitives/minus.kt index c505871422f..cf14e881a9a 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/minus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/minus.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0] - 1 if (x != 0) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/mod.kt b/compiler/testData/codegen/box/platformTypes/primitives/mod.kt index bce07788a3a..f72a03f668d 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/mod.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/mod.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(2) val x = l[0] % 2 if (x != 0) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/not.kt b/compiler/testData/codegen/box/platformTypes/primitives/not.kt index 00aae7014a9..0c280a8febc 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/not.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/not.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(true) val x = !l[0] if (x) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt b/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt index eb7fdf7a531..0f57a857b28 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0] != 1 if (x != false) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/plus.kt b/compiler/testData/codegen/box/platformTypes/primitives/plus.kt index 470fc996f40..97b8744ab0d 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/plus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/plus.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0] + 1 if (x != 2) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt b/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt index 0ef1c8c5edc..cc3512f76a0 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) var x = l[0] x += 1 diff --git a/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt b/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt index 7730d102aed..ceb1961f5df 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(2) val sb = StringBuilder() for (i in l[0]..3) { diff --git a/compiler/testData/codegen/box/platformTypes/primitives/times.kt b/compiler/testData/codegen/box/platformTypes/primitives/times.kt index 4f5aaa7c6ec..939bc056018 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/times.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/times.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0] * 2 if (x != 2) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt b/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt index f50aeba3111..429eaf77336 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/toShort.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = l[0].toShort() if (x != 1.toShort()) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/toString.kt b/compiler/testData/codegen/box/platformTypes/primitives/toString.kt index dd850d3ba09..3ad15f84649 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/toString.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/toString.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = "${l[0]}" if (x != "1") return "Fail: $x}" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt b/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt index e87e6f50d37..30ed37ccf3b 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = -l[0] if (x != -1) return "Fail: $x" diff --git a/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt b/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt index ade02492c77..c987878a3a1 100644 --- a/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt +++ b/compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt @@ -1,5 +1,5 @@ fun box(): String { - val l = java.util.ArrayList() + val l = ArrayList() l.add(1) val x = +l[0] if (x != 1) return "Fail: $x}" diff --git a/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt b/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt index 59e009da1a7..41f9e9357a0 100644 --- a/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt +++ b/compiler/testData/codegen/box/ranges/expression/emptyDownto.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/emptyRange.kt b/compiler/testData/codegen/box/ranges/expression/emptyRange.kt index 1328f7658a1..01f8c158cac 100644 --- a/compiler/testData/codegen/box/ranges/expression/emptyRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/emptyRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt index 1e5a36cb6fb..1f559bd7c76 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt index 1a4e3818a0a..5b7871e8f3f 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt b/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt index 574a7ea7c21..f746a9fd09b 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt index 9f81f8d135e..76cd7241cbf 100644 --- a/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt index 455b299c030..a521436c2c4 100644 --- a/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt index e88f55712ec..a9189c72494 100644 --- a/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt index 1aad1616b1d..43002d06489 100644 --- a/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt b/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt index d477ccf7f64..302fd2bc7c3 100644 --- a/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt b/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt index 666b1a2a617..065acfd5333 100644 --- a/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/oneElementRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/openRange.kt b/compiler/testData/codegen/box/ranges/expression/openRange.kt index e8a14931515..c9a06cc49d6 100644 --- a/compiler/testData/codegen/box/ranges/expression/openRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/openRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt index 9c9addf671e..4540e7fe94f 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt index aa453c568b0..d0476a557a1 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt index 2577445806a..47264e0a172 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt index 29090844ef9..6e876bf9329 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt b/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt index 120bb2b76f9..86ee02ba72c 100644 --- a/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt b/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt index 8d04eb30302..3542aa875b8 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt b/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt index 823d064cbf3..dc259b75860 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt b/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt index 8d77df80a4d..436528a5cd9 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt index 19300b45f90..03d7e797926 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/reversedRange.kt b/compiler/testData/codegen/box/ranges/expression/reversedRange.kt index c267bd7a3cb..098c28bf0aa 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt index 5712875686c..43771a5928e 100644 --- a/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt b/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt index 07359b3c012..ad8974021a5 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/simpleRange.kt b/compiler/testData/codegen/box/ranges/expression/simpleRange.kt index 0fe7419b2d7..306ab1d6ed0 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt b/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt index 3e5f00123c8..42a9d01dcf6 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt index b27237d7568..2b5ad22293a 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt index 8f8e4d93f30..132a8fc2a88 100644 --- a/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt b/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt index cbe751b7573..ac36fbd5d62 100644 --- a/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt +++ b/compiler/testData/codegen/box/ranges/literal/emptyDownto.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/emptyRange.kt b/compiler/testData/codegen/box/ranges/literal/emptyRange.kt index 2f6848968de..e977c4b9461 100644 --- a/compiler/testData/codegen/box/ranges/literal/emptyRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/emptyRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt index c0e791d2c2c..558a57f9399 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt index c68bac2eda5..1696d7a1cb9 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt b/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt index 64e28e1ba03..b7aec1243ad 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt index a2ab8d5e897..dfa5ea20c32 100644 --- a/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt index c9aa098a97e..ce83c868428 100644 --- a/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt index 57fd87c28b8..90ccadc9f38 100644 --- a/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt index 96caa6de49f..251774b7a0d 100644 --- a/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt b/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt index 286bfad68fd..9a5fd5f8589 100644 --- a/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt b/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt index b00e4b642b2..3d7dc4fec09 100644 --- a/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/oneElementRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/openRange.kt b/compiler/testData/codegen/box/ranges/literal/openRange.kt index 3f32906280c..488600a9207 100644 --- a/compiler/testData/codegen/box/ranges/literal/openRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/openRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt index 08a2b20e876..8ce7d3333df 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt index 969b93e9016..d04d79446d7 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt index bce14d3a9cd..c8ad40c7bd1 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt index 9c67465cb0c..0ed56310b44 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt b/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt index f3c3ad49aed..24afb460106 100644 --- a/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt +++ b/compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt @@ -4,7 +4,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList import java.lang.Integer.MAX_VALUE as MaxI import java.lang.Integer.MIN_VALUE as MinI diff --git a/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt b/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt index 1966f2e58ab..f4cd7ae0df6 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt b/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt index c2666765c8b..9c2bab57838 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt b/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt index 942f12a1d3e..c2442883533 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt index f7bc3ef6e0f..63c431ab3c8 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/reversedRange.kt b/compiler/testData/codegen/box/ranges/literal/reversedRange.kt index 21cf3169642..1d4e6649437 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt index d6826b35d12..be85c5020c0 100644 --- a/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt b/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt index a81230f19ab..13bdb9a25e9 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/simpleRange.kt b/compiler/testData/codegen/box/ranges/literal/simpleRange.kt index 933b7e9a95a..3a074a477d1 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt b/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt index 2e3af3dd55e..b242f085369 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt b/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt index dd200c5a3f8..62dd8c70251 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt b/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt index b0e1673185c..4552ee0f9f7 100644 --- a/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt +++ b/compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt @@ -1,7 +1,6 @@ // Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT! // WITH_RUNTIME -import java.util.ArrayList fun box(): String { val list1 = ArrayList() diff --git a/compiler/testData/codegen/box/regressions/Kt1149.kt b/compiler/testData/codegen/box/regressions/Kt1149.kt index f0786dbf85a..f1581c61cf7 100644 --- a/compiler/testData/codegen/box/regressions/Kt1149.kt +++ b/compiler/testData/codegen/box/regressions/Kt1149.kt @@ -2,8 +2,6 @@ package test.regressions.kt1149 -import java.util.ArrayList - public interface SomeTrait { fun foo() } diff --git a/compiler/testData/codegen/box/regressions/generic.kt b/compiler/testData/codegen/box/regressions/generic.kt index 8e1c1f3f644..c5cf2b2efff 100644 --- a/compiler/testData/codegen/box/regressions/generic.kt +++ b/compiler/testData/codegen/box/regressions/generic.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME -import java.util.* - fun ArrayList.findAll(predicate: (T) -> Boolean): ArrayList { val result = ArrayList() for(t in this) { diff --git a/compiler/testData/codegen/box/regressions/kt1800.kt b/compiler/testData/codegen/box/regressions/kt1800.kt index d07dd2aac2b..85b88bbac74 100644 --- a/compiler/testData/codegen/box/regressions/kt1800.kt +++ b/compiler/testData/codegen/box/regressions/kt1800.kt @@ -2,8 +2,6 @@ //KT-1800 error/NonExistentClass generated on runtime package i -import java.util.ArrayList - public class User(val firstName: String, val lastName: String, val age: Int) { diff --git a/compiler/testData/codegen/box/regressions/kt789.kt b/compiler/testData/codegen/box/regressions/kt789.kt index dda3e45d21f..9849559160b 100644 --- a/compiler/testData/codegen/box/regressions/kt789.kt +++ b/compiler/testData/codegen/box/regressions/kt789.kt @@ -1,7 +1,5 @@ package foo -import java.util.*; - fun box() : String { val a = ArrayList(); a.add(1) diff --git a/compiler/testData/codegen/box/safeCall/kt245.kt b/compiler/testData/codegen/box/safeCall/kt245.kt index 41acc4caff7..0678b947098 100644 --- a/compiler/testData/codegen/box/safeCall/kt245.kt +++ b/compiler/testData/codegen/box/safeCall/kt245.kt @@ -1,5 +1,5 @@ fun foo() { - val l = java.util.ArrayList(2) + val l = ArrayList(2) l.add(1) for (el in l) {} diff --git a/compiler/testData/codegen/box/specialBuiltins/bridges.kt b/compiler/testData/codegen/box/specialBuiltins/bridges.kt index 7c42be8ddcd..3b26586b311 100644 --- a/compiler/testData/codegen/box/specialBuiltins/bridges.kt +++ b/compiler/testData/codegen/box/specialBuiltins/bridges.kt @@ -1,4 +1,3 @@ -import java.util.*; interface A0 { val size: Int get() = 56 diff --git a/compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt b/compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt index 04994b149c7..c5ffa3b61d9 100644 --- a/compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt +++ b/compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt @@ -1,4 +1,3 @@ -import java.util.* open class Base() : HashSet() { override fun remove(element: Target): Boolean { diff --git a/compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt b/compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt index ce88bcf709b..15a676453c7 100644 --- a/compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt +++ b/compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt @@ -1,4 +1,3 @@ -import java.util.* open class Map1 : HashMap() class Map2 : Map1() diff --git a/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt b/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt index 49f05192011..334b9521a49 100644 --- a/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt +++ b/compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt @@ -1,4 +1,4 @@ -class A : java.util.ArrayList() { +class A : ArrayList() { override val size: Int get() = super.size + 56 } diff --git a/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt b/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt index b8ac015ccae..cf713b647c2 100644 --- a/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt +++ b/compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME -import java.util.ArrayList - fun box(): String { var x: MutableCollection = ArrayList() x + ArrayList() diff --git a/compiler/testData/codegen/box/super/basicmethodSuperClass.kt b/compiler/testData/codegen/box/super/basicmethodSuperClass.kt index 1b8a48bbfe9..612cee4e58b 100644 --- a/compiler/testData/codegen/box/super/basicmethodSuperClass.kt +++ b/compiler/testData/codegen/box/super/basicmethodSuperClass.kt @@ -1,5 +1,3 @@ -import java.util.ArrayList - class N() : ArrayList() { override fun add(el: Any) : Boolean { if (!super.add(el)) { diff --git a/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt b/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt index c147c0b8b1c..886987cf6f3 100644 --- a/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt +++ b/compiler/testData/codegen/box/super/basicmethodSuperTrait.kt @@ -1,4 +1,3 @@ -import java.util.ArrayList interface Tr { fun extra() : String = "_" diff --git a/compiler/testData/codegen/box/vararg/kt581.kt b/compiler/testData/codegen/box/vararg/kt581.kt index 72c306274b5..829dc640f1d 100644 --- a/compiler/testData/codegen/box/vararg/kt581.kt +++ b/compiler/testData/codegen/box/vararg/kt581.kt @@ -1,7 +1,5 @@ package whats.the.difference -import java.util.HashSet - fun iarray(vararg a : Int) = a // BUG val IntArray.indices: IntRange get() = IntRange(0, lastIndex()) fun IntArray.lastIndex() = size - 1 diff --git a/compiler/testData/codegen/box/when/is.kt b/compiler/testData/codegen/box/when/is.kt index 4c8a88fce5c..fa0580b2740 100644 --- a/compiler/testData/codegen/box/when/is.kt +++ b/compiler/testData/codegen/box/when/is.kt @@ -1,11 +1,11 @@ fun typeName(a: Any?) : String { return when(a) { - is java.util.ArrayList<*> -> "array list" + is ArrayList<*> -> "array list" else -> "no idea" } } fun box() : String { - if(typeName(java.util.ArrayList ()) != "array list") return "array list failed" + if(typeName(ArrayList()) != "array list") return "array list failed" return "OK" } diff --git a/compiler/testData/codegen/box/when/range.kt b/compiler/testData/codegen/box/when/range.kt index 53dbaff1683..a8d8c41c144 100644 --- a/compiler/testData/codegen/box/when/range.kt +++ b/compiler/testData/codegen/box/when/range.kt @@ -1,5 +1,5 @@ fun isDigit(a: Int) : String { - val aa = java.util.ArrayList () + val aa = ArrayList () aa.add(239) return when(a) { diff --git a/compiler/testData/codegen/box/when/switchOptimizationDense.kt b/compiler/testData/codegen/box/when/switchOptimizationDense.kt index c10f7a03e0c..3fc11852388 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationDense.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationDense.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME -import java.util.ArrayList - fun dense(x: Int): Int { return when (x) { -4 -> 9 diff --git a/compiler/testData/codegen/box/when/switchOptimizationSparse.kt b/compiler/testData/codegen/box/when/switchOptimizationSparse.kt index 0c7647b23cf..35e33e80d73 100644 --- a/compiler/testData/codegen/box/when/switchOptimizationSparse.kt +++ b/compiler/testData/codegen/box/when/switchOptimizationSparse.kt @@ -1,7 +1,5 @@ // WITH_RUNTIME -import java.util.ArrayList - fun sparse(x: Int): Int { return when ((x % 4) * 100) { 100 -> 1 diff --git a/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt b/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt index ef67028722d..48ebea48731 100644 --- a/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt +++ b/compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt @@ -4,7 +4,7 @@ fun inc(): Int { return 0 } fun box(): String { - val al = java.util.ArrayList() + val al = ArrayList() when (inc()) { in al -> return "fail 1" else -> {} diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java index 7ecae3fd112..32e2f18775a 100644 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateRangesCodegenTestData.java @@ -136,7 +136,6 @@ public class GenerateRangesCodegenTestData { out.println("// Auto-generated by " + GenerateRangesCodegenTestData.class.getName() + ". DO NOT EDIT!"); out.println("// WITH_RUNTIME"); out.println(); - out.println("import java.util.ArrayList"); if (generatedBody.contains("Max") || generatedBody.contains("Min")) { // Import min/max values, but only in case when the generated test case actually uses them (not to clutter tests which don't) out.println();