Files
kotlin-fork/compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt
T
Mikhail Zarechenskiy a0d7b703f4 Align generic signature for inner classes to work as in Java
#KT-10397 Fixed

According to JVMS (p. 4.3.4) inner classes should be separated with `$` in generic signature.

Note that in Java, inner types separated with `.` after first parameterized type, and now we preserve the same behaviour. See tests for clarification.
2017-04-27 15:47:28 +03:00

15 lines
311 B
Kotlin
Vendored

// WITH_REFLECT
// IGNORE_BACKEND: JS, NATIVE
abstract class Outer {
inner class Inner
fun foo(): Inner? = null
}
fun box(): String {
kotlin.test.assertEquals(
"class Outer\$Inner",
Outer::class.java.declaredMethods.single().genericReturnType.toString())
return "OK"
}