wasyl
07/13/2017, 9:03 AMString getName()
in interface would be implemented by val name: String
property. I get same JVM signature
error, although this SO answer suggests that having the property private
would solve the problem: https://stackoverflow.com/questions/29268526/how-to-overcome-same-jvm-signature-error-when-implementing-a-java-interfacekarelpeeters
07/13/2017, 10:38 AMoverride
to it?wasyl
07/13/2017, 11:47 AMprivate/[]
and override, nothing workedkarelpeeters
07/13/2017, 12:02 PMwasyl
07/13/2017, 12:53 PMCzar
07/13/2017, 2:18 PMclass KtClass(private val name: String) : JInterface {
override fun getName() = name
}
I use this in my code base, it's kinda hacky to my taste, but it works when I do not have control over the interface/parent.