swift
dd1b1577 - Partially Revert #27862

Commit
6 years ago
Partially Revert #27862 When SE-110 was being implemented, we accidentally began to accept closure parameter declarations that had no associated parameter names, e.g. foo { ([Int]) in /**/ } This syntax has never been sanctioned by any version of Swift and should be banned. However, the change was made long enough ago and there are enough clients relying on this, that we cannot accept the source break at the moment. For now, add a bit to ParamDecl that marks a parameter as destructured, and back out setting the invalid bit on the type repr for these kinds of declarations. To prevent further spread of this syntax, stub in a warning that offers to insert an anonymous parameter. Resolves part of rdar://56673657 and improves QoI for errors like rdar://56911630
Author
Committer
Parents
Loading