mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Inside fragile functions, we expect function derivatives to be public, which could be achieved by either explicitly marking the functions as differentiable or having a public explicit derivative defined for them. This is obviously not possible for single and double curry thunks which are a special case of `AutoClosureExpr`. Instead of looking at the thunk itself, we unwrap it and look at the function being wrapped. While the thunk itself and its differentiability witness will not have public visibility, it's not an issue for the case where the function being wrapped (and its witness) have public visibility. Fixes #54819 Fixes #75776
This directory tests compiler crashers related to differentiable programming in Swift.
lit.local.cfg checks for asserts as a lit available feature, so there is
no need to add REQUIRES: asserts to individual test files.