package interfaceinline
import java.util.ArrayList
interface ListHasShape<H: HasShape>:Iterable<H>{
val list: ArrayList<H>
inline final fun <reified T : Data> by() = emptyList<T>()
}
open class HasShape(var shape: Shape)
interface Data
abstract class Shape
If I preserve ‘final’ then
Modifier ‘final’ is deprecated inside ‘interface’
If I remove ‘final’ then
‘‘inline’’ modifier is not allowed on virtual members. Only private or final members can be inlined.
How to write properly?
PS. Full project code is here.