private interface PrivateInterface { fun foo(): T } class PublicClass : PrivateInterface { override fun foo(): Int = error("stub") }