[5.8] In Swift 5.8, if a property of a optional value is assigned within a closure, it will cause the type inference of the closure's return value to change from void to optional void. #64027
Labels
assignments
Feature → expressions: assignments
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
expressions
Feature: expressions
optional chaining
Feature → expressions: optional chaining
swift 5.9
type checker
Area → compiler: Semantic analysis
type inference
Feature: type inference
unexpected behavior
Bug: Unexpected behavior or incorrect output
In Swift 5.8, if a property of a optional value is assigned within a closure, it will cause the type inference of the closure's return value to change from void to optional void.
Description
Run the following code
Output
() -> Optional<()>
Environment
The text was updated successfully, but these errors were encountered: