Matching optionals in a switch statement

That's a good idea.

It ought to comple as well. That's a bug.

Thanks for raising these issues! If you have a moment, both of them are worth filing on bugs.swift.org, if you haven't already.