Vague error description when trying to match an instance in a switch statement

The following code

struct A {}

let x = A()
let y = A()

switch x {
     case y:
         break
     default:
         break
}

produces "error: expression pattern of type 'A' cannot match values of type 'A'".
This is kind of a vague description of what is really going on,
the compiler actually expects A to adopt Equatable protocol.

I'm using:
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9

I wasn't sure where to post this.
It would be nice if the error message could be improved to spare confusion for
the other developers.

Indeed. If you can file a bug about this, that’d be grand.

<Issues · apple/swift · GitHub;

Share and Enjoy

···

On 15 Sep 2016, at 19:53, hello--- via swift-users <swift-users@swift.org> wrote:

It would be nice if the error message could be improved to spare confusion for
the other developers.

--
Quinn "The Eskimo!" <http://www.apple.com/developer/&gt;
Apple Developer Relations, Developer Technical Support, Core OS/Hardware