[SR-14880] [AutoDiff] Crash caused by storing a closure into a variable member of a struct #57227
Labels
assertion failure
Bug → crash: An assertion failure
AutoDiff
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
SILGen
Area → compiler: The SIL generation stage
swift for tensorflow
Attachment: Download
Environment
macOS 11.4 with Swift development snapshot 2021-06-13:
Additional Detail from JIRA
md5: 7e18065aaef6b8633a9c9c49581ccbd4
Issue Description:
Hello all,
I think I stumbled upon a in bug in the compiler. The code chunk below crashes with a failed assertion. The stack trace is attached.
I did some experimentation and the trigger seems to be storing a multi (two and more) argument `@differentiable` closure as `var` member of a struct. Single argument closures work well and non-mutable members, i.e. `let` works too.
The text was updated successfully, but these errors were encountered: