I can return a list of all subclasses of one class? For example:
class Mother {
}
class ChildFoo: Mother {
}
class ChildBar: Mother {
}
let motherSubclasses = ... // TODO
print(motherSubclasses) // should to return [ChildFoo.self, ChildBar.self]
Aucun commentaire:
Enregistrer un commentaire