Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt9345.kt
T
Ilya Gorbunov ac790bea71 Reorganize diagnostics tests with stdlib and reflect
DiagnosticsTestWithStdLib now require stdlib only.
Move test data accordingly.
The only test that required kotlin-reflect is transformed into
codegen box test.
2020-01-16 15:35:58 +03:00

15 lines
277 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
// KT-9345 Type inference failure
fun Class<*>.foo(): Any? = kotlin.objectInstance
object OK {
override fun toString(): String = "OK"
}
fun box(): String {
return OK::class.java.foo().toString()
}