[SR-5870] Crash when capture list references parameter of outer single-expression closure #48440
Labels
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
type checker
Area → compiler: Semantic analysis
Environment
Apple Swift version 4.0 (swiftlang-900.0.63.10 clang-900.0.36)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 21f4fd19bde47e7a35fb7f40b04eec6c
duplicates:
is duplicated by:
Issue Description:
The following crashes the compiler:
Attempting to capture
c
asweak
orunowned
doesn't crash the compiler, but it does incorrectly yield error message(s):In both cases, manually binding to a new variable before capturing compiles and runs as expected:
The text was updated successfully, but these errors were encountered: