This goes beyond type significance as far as I can tell. 

Bug report?

-- E

enum Sample { case foo(Int), bar(label: Int) }

let aFoo: Sample = .foo(1)
let aBar: Sample = .bar(label: 1) // requires label

if case let .foo(value) = aFoo { print(value) } // works
if case let .bar(value) = aBar { print(value) } // works
if case let .foo(label: value) = aFoo { print(value) } // works
if case let .bar(label: value) = aBar { print(value) } // works


_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to