-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
@discardableResultFeature → attributes: The @discardableResult attributeFeature → attributes: The @discardableResult attributeattributesFeature: Declaration and type attributesFeature: Declaration and type attributesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselferror handlingexpressionsFeature: expressionsFeature: expressionsswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysisunexpected warningBug: Unexpected warningBug: Unexpected warning
Description
Description
No response
Reproduction
@discardableResult
func foo() throws -> Int {}
func test() {
try? foo() // warning: result of 'try?' is unused [expression_unused_optional_try]
}
Expected behavior
No warning
Environment
Swift version 5.11-dev (Swift 11ef6e5)
Additional information
No response
giginet, Pash237 and sindresorhus
Metadata
Metadata
Assignees
Labels
@discardableResultFeature → attributes: The @discardableResult attributeFeature → attributes: The @discardableResult attributeattributesFeature: Declaration and type attributesFeature: Declaration and type attributesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselferror handlingexpressionsFeature: expressionsFeature: expressionsswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysisunexpected warningBug: Unexpected warningBug: Unexpected warning