for consistency, moved extension functions on iterator/iterable/collection to the kotlin package rather than being split across kotlin and kotlin.util. Once intrinsic collections are here we could consider moving the java.util extension functions into kotlin.java.util
This commit is contained in:
@@ -63,7 +63,7 @@ fun main(args: Array<String>) {
|
||||
it.replaceAll("java.lang.Iterable<T", "Iterable<T")
|
||||
}
|
||||
|
||||
generateFile(File(outDir, "JavaUtilIteratorsFromJavaIterables.kt"), "package kotlin.util", File(srcDir, "JavaIterables.kt")) {
|
||||
generateFile(File(outDir, "JavaUtilIteratorsFromJavaIterables.kt"), "package kotlin", File(srcDir, "JavaIterables.kt")) {
|
||||
it.replaceAll("java.lang.Iterable<T", "java.util.Iterator<T")
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ fun main(args: Array<String>) {
|
||||
it.replaceAll("java.util.Collection<T", "Array<T")
|
||||
}
|
||||
|
||||
generateFile(File(outDir, "JavaUtilIterablesFromJavaCollections.kt"), "package kotlin.util", File(srcDir, "JavaCollections.kt")) {
|
||||
generateFile(File(outDir, "JavaUtilIterablesFromJavaCollections.kt"), "package kotlin", File(srcDir, "JavaCollections.kt")) {
|
||||
it.replaceAll("java.util.Collection<T", "java.lang.Iterable<T").replaceAll("(this.size)", "")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package regressions
|
||||
|
||||
// TODO comment out the next line to reproduce KT-1617
|
||||
import kotlin.util.map
|
||||
import kotlin.util.arrayList
|
||||
//import kotlin.util.map
|
||||
|
||||
import java.util.Collection
|
||||
import java.io.File
|
||||
|
||||
@@ -2,7 +2,6 @@ package regressions
|
||||
|
||||
import junit.framework.TestCase
|
||||
import java.util.List
|
||||
import kotlin.util.arrayList
|
||||
|
||||
class Kt1619Test: TestCase() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user