mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
with no returns *must* be (), add a defaulting constraint so that it will be inferred as () in the absence of other possibilities. The chief benefit here is that it allows better QoI when the user simply hasn't yet written the return statement. Doing this does regress a corner case where an attempt to recover from an uncalled function leads to the type-checker inferring a result for a closure that doesn't make any sense at all. Swift SVN r30476
165 KiB
165 KiB