swift
c6b6688a - [3.0 compat] Don't diagnose @escaping var-arg closures.

Commit
8 years ago
[3.0 compat] Don't diagnose @escaping var-arg closures. Var-arg closures are already escaping, so we typically want to issue an error if @escaping is specified. To not do sure will confuse and give a false impression on the un-annotated semantics and whether it is needed. But, 3.0 shipped with a bug where we didn't consistently apply the no-escape-by-default rule here, and thus it was semantically meaningful (and needed). In order to preserve source compatibility, albeit at the expense of developers on versions 3.0.1 and later in the Swift 3 family, we suppress the error if we see @escaping. Either way, this is a relatively uncommon usage, so the confusion won't be too wide spread.
Author
Committer
Parents
Loading