Commit Graph

2 Commits

Author SHA1 Message Date
Mark Lacey
9ff4bd51e8 Make closures.swift test compile in both Swift 3 and 4 modes.
Split out the things that are really specific to Swift 3 into a new
closures_swift3.swift.

In the process I found that two things that should compile without error
under -swift-version 4 do not, so those tests are currently in
closures_swift3.swift and I have opened new bugs for the issues:

https://bugs.swift.org/browse/SR-5791
https://bugs.swift.org/browse/SR-5792
2017-08-29 11:42:56 -07:00
Pavel Yaskevich
b755960e82 [Diagnostics] Suggest removing anonymous closure parameters if none are expected
If the contextual closure type expects no parameters but N
parameters where used and all of the them are anonymous, let's
suggest removing them.

Resolves: rdar://problem/32432145
2017-05-31 23:59:34 -07:00