The interfaces
interface IBack0 {
val name : String
}
and
interface IBack1 {
fun getName() : String
}
generate the same bytecode
public abstract interface {TypeName} {
// access flags 0x401
public abstract getName()Ljava/lang/String;
@Lorg/jetbrains/annotations/NotNull;() // invisible
LOCALVARIABLE this L{TypeName}; L0 L1 0
//redacted kotlin metadata
}
However in utilization, only the interface using the field is faced with a platform declaration clash when paired with an abstract class
abstract class Back0 {
fun getName() = ""
}
The error being
Class 'Inner0' is not abstract and does not implement abstract member public abstract val name: String defined in com.sxtanna.core.test.IBack0 Inherited platform declarations clash: The following declarations have the same JVM signature (getName()Ljava/lang/String;): fun <get-name>(): String defined in com.sxtanna.core.test.Inner0 fun getName(): String defined in com.sxtanna.core.test.Inner0
If you attempt to then implement the field from the interface, you are faced with this error
Is this normal behavior?