Files
kotlin-fork/compiler/testData/codegen/box/reflection/builtins/collections.kt
T
Mikhail Glukhikh a4c7619c89 [FIR2IR] Introduce & use FirBuiltInsPackageFragment
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.
2020-03-24 10:37:53 +03:00

29 lines
581 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
// FULL_JDK
// See KT-11258, KT-16616
import java.util.*
import kotlin.test.assertEquals
fun box(): String {
listOf(
ArrayList::class,
LinkedList::class,
AbstractList::class,
HashSet::class,
TreeSet::class,
HashMap::class,
TreeMap::class,
AbstractMap::class,
AbstractMap.SimpleEntry::class
).map {
it.members.map(Any::toString)
}
assertEquals(1, Collection<Any>::size.getter(listOf(1)))
return "OK"
}