Call getMethod/getDeclaredMethod depending on visibility
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import kotlin.reflect.jvm.*
|
||||
|
||||
class K<in T : String> {
|
||||
private var t: T
|
||||
get() = "OK" as T
|
||||
set(value) {}
|
||||
|
||||
fun run(): String {
|
||||
val p = ::t
|
||||
p.accessible = true
|
||||
p.set(this, "" as T)
|
||||
return p.get(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = K<String>().run()
|
||||
+6
@@ -3038,6 +3038,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateToThisAccessors.kt")
|
||||
public void testPrivateToThisAccessors() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/properties/privateToThisAccessors.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("propertyOfNestedClassAndArrayType.kt")
|
||||
public void testPropertyOfNestedClassAndArrayType() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/properties/propertyOfNestedClassAndArrayType.kt");
|
||||
|
||||
Reference in New Issue
Block a user