Support KClass.nestedClasses

This commit is contained in:
Alexander Udalov
2015-08-04 22:50:55 +03:00
parent e8dc9ede31
commit 94d45f35d4
9 changed files with 126 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
public class J {
public class Inner {}
public static class Nested {}
private static class PrivateNested {}
// This anonymous class should not appear in 'nestedClasses'
private final Object o = new Object() {};
}

View File

@@ -0,0 +1,7 @@
import kotlin.test.assertEquals
fun box(): String {
assertEquals(listOf("Inner", "Nested", "PrivateNested"), J::class.nestedClasses.map { it.simpleName!! }.toSortedList())
return "OK"
}