[SR-10105] @discardableResult from protocol is not applied when optionals introduced #52507
Labels
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
Additional Detail from JIRA
md5: 0de5b9a4ccfa7d8aa896b8c8c9e607e2
duplicates:
Issue Description:
It seems @discardableResult on protocols get ignored when one of the pieces are optional:
When I remove the optional from `(Bar & BarImpl)?` or `func foo2() -> Int?`, the warning goes away.
The text was updated successfully, but these errors were encountered: