Files
kotlin/compiler/testData/codegen/box/callableReference/classesAreSynthetic.kt
2019-11-19 11:00:09 +03:00

21 lines
376 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
class C {
fun f() {}
val r = 0
}
fun check(c: Class<*>) {
if (!c.isSynthetic) throw AssertionError("Fail: $c is not synthetic: ${c.modifiers}")
}
fun box(): String {
check(C::f.javaClass)
check(C::r.javaClass)
check(C()::f.javaClass)
check(C()::r.javaClass)
return "OK"
}