Codegen tests: move stdlib tests to boxWithStdlib
This commit is contained in:
committed by
Alexander Udalov
parent
83b93071d3
commit
8a605b3884
@@ -0,0 +1,19 @@
|
||||
import kotlin.util.*
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
|
||||
fun sample() : Reader {
|
||||
return StringReader("""Hello
|
||||
World""");
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
// TODO compiler error
|
||||
// both these expressions causes java.lang.NoClassDefFoundError: collections/CollectionPackage
|
||||
val list1 = sample().useLines{it.toArrayList()}
|
||||
val list2 = sample().useLines<ArrayList<String>>{it.toArrayList()}
|
||||
|
||||
if(arrayList("Hello", "World") != list1) return "fail"
|
||||
if(arrayList("Hello", "World") != list2) return "fail"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user