Is it possible to do something like this (from Swi...
# getting-started
n
Is it possible to do something like this (from Swift) with Kotlin?
Copy code
protocol /* interface */ Person : class {}

// classes Father and Mother defined in a 3rd party library
extension Father: Person {} // extending with the protocol/interface
extension Mother: Person {} // extending with the protocol/interface

// now person can be assigned to objects of type Father / Mother
var person: Person?