Remove unneeded default imports in stdlib and tests

This commit is contained in:
Alexander Udalov
2018-09-28 14:57:14 +02:00
parent 199ae3bac8
commit 55c8b35eee
67 changed files with 24 additions and 158 deletions
@@ -13,9 +13,6 @@ package kotlin.collections
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns a list containing all elements that are instances of specified class.
@@ -13,9 +13,6 @@ package kotlin.collections
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns a list containing all elements that are instances of specified class.
@@ -13,9 +13,6 @@ package kotlin.comparisons
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns the greater of two values.
@@ -13,9 +13,6 @@ package kotlin.sequences
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns a sequence containing all elements that are instances of specified class.
@@ -13,9 +13,6 @@ package kotlin.text
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
//
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
/**
* Returns a [SortedSet][java.util.SortedSet] of all characters.
@@ -8,7 +8,6 @@
package kotlin.collections
import kotlin.*
import kotlin.internal.InlineOnly
import kotlin.internal.apiVersionIsAtLeast
@@ -8,8 +8,6 @@
package kotlin.sequences
import kotlin.*
/**
* Creates a sequence that returns all values from this enumeration. The sequence is constrained to be iterated only once.
* @sample samples.collections.Sequences.Building.sequenceFromEnumeration
@@ -5,7 +5,6 @@
package kotlin.internal
import kotlin.*
import java.util.regex.MatchResult
import kotlin.random.FallbackThreadLocalRandom
import kotlin.random.Random
@@ -89,4 +88,4 @@ private fun getJavaVersion(): Int {
@PublishedApi
@SinceKotlin("1.2")
internal fun apiVersionIsAtLeast(major: Int, minor: Int, patch: Int) =
KotlinVersion.CURRENT.isAtLeast(major, minor, patch)
KotlinVersion.CURRENT.isAtLeast(major, minor, patch)
@@ -7,7 +7,6 @@
package kotlin.io
import kotlin.text.*
import java.io.InputStream
import java.nio.Buffer
import java.nio.ByteBuffer
@@ -219,4 +218,4 @@ private fun Buffer.flipBack() {
private fun CharBuffer.dequeue(): Char {
flip()
return get().also { compact() }
}
}
@@ -5,7 +5,6 @@
package kotlin.io
import kotlin.text.*
import java.io.File
import java.io.IOException
@@ -9,7 +9,6 @@
package kotlin.io
import java.io.File
import kotlin.*
/**
* Estimation of a root name by a given file name.
@@ -8,7 +8,6 @@
package kotlin.io
import kotlin.*
import java.io.File
import java.io.IOException
import java.util.Stack
@@ -8,11 +8,8 @@
package kotlin.io
import java.io.*
import java.util.*
import kotlin.*
import kotlin.text.*
import kotlin.comparisons.*
import java.io.File
import java.io.IOException
/**
* Creates an empty directory in the specified [directory], using the given [prefix] and [suffix] to generate its name.
@@ -5,8 +5,6 @@
package kotlin.jvm.internal.unsafe
import kotlin.*
private fun monitorEnter(@Suppress("UNUSED_PARAMETER") monitor: Any): Unit =
throw UnsupportedOperationException("This function can only be used privately")
@@ -8,8 +8,6 @@
package kotlin.ranges
import kotlin.*
/**
* A closed range of values of type `Float`.
*
@@ -6,8 +6,6 @@
@file:kotlin.jvm.JvmName("ProcessKt")
package kotlin.system
import kotlin.*
/**
* Terminates the currently running Java Virtual Machine. The
* argument serves as a status code; by convention, a nonzero status
@@ -19,4 +17,4 @@ import kotlin.*
public inline fun exitProcess(status: Int): Nothing {
System.exit(status)
throw RuntimeException("System.exit returned normally, while it was supposed to halt JVM.")
}
}
@@ -5,8 +5,6 @@
package kotlin.text
import kotlin.*
/**
* Represents the character general category in the Unicode specification.
*/
@@ -172,4 +170,4 @@ public enum class CharCategory(public val value: Int, public val code: String) {
public fun valueOf(category: Int): CharCategory = categoryMap[category] ?: throw IllegalArgumentException("Category #$category is not defined.")
}
}
}
@@ -5,8 +5,6 @@
package kotlin.text
import kotlin.*
/**
* Represents the Unicode directionality of a character.
* Character directionality is used to calculate the
@@ -2,14 +2,12 @@
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("CharsKt")
package kotlin.text
import kotlin.*
/**
* Returns `true` if this character (Unicode code point) is defined in Unicode.
*/
@@ -158,4 +156,4 @@ internal actual fun checkRadix(radix: Int): Int {
throw IllegalArgumentException("radix $radix was not in valid range ${Character.MIN_RADIX..Character.MAX_RADIX}")
}
return radix
}
}
@@ -9,9 +9,6 @@
package kotlin.text
import kotlin.*
/**
* Returns a string representation of this [Byte] value in the specified [radix].
*
@@ -8,7 +8,6 @@
package kotlin.math
import kotlin.*
import kotlin.internal.InlineOnly
import kotlin.math.Constants.LN2
import kotlin.math.Constants.taylor_2_bound
@@ -16,7 +15,6 @@ import kotlin.math.Constants.taylor_n_bound
import kotlin.math.Constants.upper_taylor_2_bound
import kotlin.math.Constants.upper_taylor_n_bound
import java.lang.Math as nativeMath
private object Constants {