Nested `if let` syntax issues?

Hello hello.


Since Swift 3 and Xcode 8, nested `if let` aren't correctly syntax highlighted? For instance:


if let first = dict["foo"] as? String,
     let second = dict["bar"] as? String
{
     // ...
}


The first `let` keyword is correctly highlighted by Xcode. The second `let` keyword, and any succeeding `var` and `let` keywords in the if statement aren't. This has been present since Xcode 8, and is still present in Xcode 8.1 GM. Funnily enough, Swift Playgrounds on iPad doesn't have this problem.


This is seriously triggering my OCD. 😉


If this can be fixed manually, I'd be glad to know. Thanks in advance!

Replies

That will probably change noting, but what happens if you write on the same line ?

Nyet. No amount of whitespace (or lack thereof) changes this. 🙂

You should definitely file a bug about this. Please post your bug number, just for the record.

This is seriously triggering my OCD.

Alas, I don’t think that Apple can fix that (-:

ps I’ve noticed and been annoyed by this myself, although I haven’t got around to filing my own bug yet.

pps As I like to tell folks, it’s only OCD if it causes a problem. I like to characterise my personality as simply OC (-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"