> On 29 Nov 2016, at 14:55, Adrian Zubarev via swift-evolution
> <[email protected]> wrote:
>
> I’d rather would have the ability of overloading enum cases:
>
> enum MyEnum {
>
> case a
> case a(Int)
> case a(label: Int)
> case a(Double)
> }
> I don’t know how enums work internally, but I spotted a bug recently where
> the compiler does not allow to declare a function with the same name as an
> enum case.
>
> SR–3256 <https://bugs.swift.org/browse/SR-3256>
> I think this is a side effect of this proposal
> https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md
>
> <https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md>
>
eek… I really would not like that at all.
if case .a(let value) = myEnumValue {
// what is type(of: value)?
}
- Karl
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution