> On 24 Jan 2017, at 00:52, Joe Groff via swift-evolution
> <[email protected]> wrote:
>
> We're not terribly principled about this right now with non-pattern
> declaration references. You can still reference an unapplied function by its
> base name alone without its labels, if it's unambiguous:
>
> func foo(x: Int, y: Int) {}
>
> let foo_x_y: (Int, Int) -> () = foo
>
> so it'd be consistent to continue to allow the same in pattern references.
WRT ambiguity, do we loose the ability to pattern match on the naked case name
when two cases share the same base name?
enum Foo {
case bar(a: Int)
case bar(b: String)
}
switch aFoo {
case .bar: // matches both cases
break
}_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution