``` /** * JVM internal name of the class, where p...
# reflect
m
Copy code
/**
 * JVM internal name of the class, where package names are separated by '/', and class names are separated by '$',
 * for example: `"org/foo/bar/Baz$Nested"`
 */
val ClassName.jvmInternalName: String
    get() =
        if (this.isLocal) substring(1)
        else replace('/', '$')
Isn't it supposed to replace
.
with
$
, not
/
with
$
?
g
On bytecode level jvm uses
/
, not
.
like in source code. You can open any bytecode and check
java.lang.String
becomes
java/lang/String
i
@Marc Knaup seems so. Could you please report a bug?
m