It's a very common pattern to write functions that take a closure and return this closure's result. An example is autoreleasepool, since SE-0061.
The most simple one is:
The issue is that Swift compiler (in both versions 2.2 and swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a) outputs an error `Generic parameter 'Result' could not be inferred` whenever the closure contains a line of code followed with a return statement:
The workaround is to add explicit type declaration:
The problem is that this workaround is not easy to find for regular users: they complain and report issues.
As for the variant 2 itself, which does not use the returned value, it can be the sign of some unfinished code, or of some actual issue: we need an "unused result" warning, not an error.