[SR-13258] Conditional binding compiles successfully without optional type #55698
Labels
accepts invalid
Bug: Accepts invalid
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
Xcode 12 beta 2, beta 1.
Works as expected in Xcode 11.5
Additional Detail from JIRA
md5: 5b28d669d0ca987c42d8e004109f10d7
Issue Description:
Code to reproduce:
let a = 1
let b = Int?(nil)
if let c = b ?? a { print(c) }
Extracting nil-coalescing expression to another variable helps.
The text was updated successfully, but these errors were encountered: