This (contrived) example, adopted from the documentation for withoutActuallyEscaping, compiles and runs as expected:
When I make the function argument an @autoclosure like so:
compilation fails on line 2 with this error: "Expression type '(, () throws -> _) throws -> _' is ambiguous without more context".
I tried adding type annotations to get rid of the alleged ambiguity that seemed to confuse the type checker, but I haven't found a way to get rid of the error. After I added full type annotations like this:
the ambiguity error remained and another error appeared on the array.lazy... line: "Closure use of non-escaping parameter 'escapableF' may allow it to escape".
Tested with 3.1-DEVELOPMENT-SNAPSHOT-2017-03-06-a.
Background: the above example is contrived. My actual use case is that I'd like to use withoutActuallyEscaping inside a custom assertion function that should take its arguments as autoclosures.