[SR-4718] Define property that conforms to a protocol #47295
Labels
compiler
The Swift compiler in itself
duplicate
Resolution: Duplicates another issue
existentials
Feature: values of types like `any Collection`, `Any` and `AnyObject`; type-erased values
feature
A feature request or implementation
protocol compositions
Feature → types: protocol composition types
swift evolution implemented
Flag → feature: A feature that was approved through the Swift evolution process and implemented
Additional Detail from JIRA
md5: 7fb30aa97e7cd85d235158c3f33ef324
duplicates:
Issue Description:
Hi guys, I'm just wondering if is possible to have in the next release a way to define a property that conforms to a specific protocol.
e.g.
Is that possible?
I know that I can do the follow way
but I would like to avoid subclassing.
Looking forward to your answer, cheers!
Carmelo
The text was updated successfully, but these errors were encountered: