// TARGET_BACKEND: JVM // FULL_JDK // WITH_RUNTIME import java.lang.reflect.Modifier abstract class A : Collection { protected fun foo(x: Array): Array = x } fun box(): String { val method = A::class.java.declaredMethods.single { it.name == "foo" } return if (Modifier.isProtected(method.modifiers)) "OK" else "Fail: $method" }