So from: ``` public interface MyInterface { Stri...
# announcements
c
So from:
Copy code
public interface MyInterface {
  String getText();
}
I can’t seem to use:
Copy code
class MyClass(val text: String): MyInterface
c
You can't, unfortunately. You will have to do
Copy code
class MyImplementation(internal val text: String) : MyInterface {
	override fun getText() = text
}
using
internal
instead of private allows you to use
.text
with its instances when called from the same module from kotlin, if you kept it
private
you would have to use
.getText()
even from Kotlin.
c
Ok, thanks Alexander!