[SR-7878] Incorrect Closure Signature with Void crashes Compiler #50413
Labels
access control
Feature → modifiers: Access control and access levels
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
regression
swift 4.2
Attachment: Download
Environment
Swift dev toolchain from 30-05-2018. Xcode 9.4
Additional Detail from JIRA
md5: 9124c3828d567af6e86d6c5b6445cecd
Issue Description:
Following code crashes the Swift compiler with "Command failed due to signal: Abort trap: 6":
The code is incorrect. The line `(state: Void) -> Iterator.Element? in` is missing `inout` before the Void. Spelling it correctly or letting the signature be inferred with `_ in` as seen in the comments works fine.
Same code isn't crashing in 4.2.1 that ships with Xcode 9.4, so this seems to be a regression.
The text was updated successfully, but these errors were encountered: