[swift-evolution] Fixing raw enum types

Joe Groff jgroff at apple.com
Tue Jan 17 15:13:37 CST 2017


> On Jan 17, 2017, at 1:12 PM, Anton Zhilin <antonyzhilin at gmail.com> wrote:
> 
> 2017-01-17 22:26 GMT+03:00 Joe Groff <jgroff at apple.com <mailto:jgroff at apple.com>>:
>> enum Something : RawRepresentable<Int32>
>> +1. But we don’t have generic protocols right now :(
>> 
> 
> I think this would be the right direction to go if we wanted to de-magic the existing RawRepresentable behavior. At this point, It would be reasonable to support this via where clauses on associated types:
> 
> enum Something: RawRepresentable where RawValue == Int32 { ... }
> 
> We don't have this conformance syntax either.

Sorry, I wasn't clear. We don't now, but in the fullness of time we should be able to support that.

-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170117/6e1d1c9f/attachment-0001.html>


More information about the swift-evolution mailing list