KT-864 wrong namespace class name generation

This commit is contained in:
Alex Tkachman
2012-01-04 12:12:02 +02:00
parent bf29d48772
commit 15fde646c1
6 changed files with 37 additions and 14 deletions
@@ -0,0 +1,20 @@
import std.io.*
import std.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/namespace
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"
}