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
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.tools
import kotlinx.metadata.jvm.*
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.*
import kotlin.comparisons.*
val ACCESS_NAMES = mapOf(
Opcodes.ACC_PUBLIC to "public",
@@ -187,4 +186,4 @@ private fun findAnnotation(annotationName: String, visibleAnnotations: List<Anno
visibleAnnotations?.firstOrNull { it.refersToName(annotationName) }
?: if (includeInvisible) invisibleAnnotations?.firstOrNull { it.refersToName(annotationName) } else null
fun AnnotationNode.refersToName(name: String) = desc.startsWith('L') && desc.endsWith(';') && desc.regionMatches(1, name, 0, name.length)
fun AnnotationNode.refersToName(name: String) = desc.startsWith('L') && desc.endsWith(';') && desc.regionMatches(1, name, 0, name.length)
@@ -94,9 +94,6 @@ fun List<MemberBuilder>.writeTo(file: File, platformSource: PlatformSourceFile)
writer.appendln("import withType")
}
}
writer.appendln("import kotlin.*")
writer.appendln("import kotlin.text.*")
writer.appendln("import kotlin.comparisons.*")
if (platform == Platform.Common) {
writer.appendln("import kotlin.random.*")
}