[SR-10509] Optional map with nil coalesce fails to compile in if-statement #52909
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
parser
Area → compiler: The legacy C++ parser
Environment
The results are the same on all three toolchains:
swift-5.1-DEVELOPMENT-SNAPSHOT-2019-04-16-a
swift-5.0-RELEASE
swift-4.1-RELEASE
Additional Detail from JIRA
md5: 700c8a911c5e2a7709e3e9b418643ec0
duplicates:
Issue Description:
The following fails to compile:
Here's the output:
The following does compile:
With parentheses:
Assigning to value:
I expect the code to compile without extra parentheses or having to assign it to a value first.
The text was updated successfully, but these errors were encountered: