Skip to content

Typed throws does not check for Error conformance in do-catch statement #84305

@hamishknight

Description

@hamishknight

The following is currently accepted but should be illegal:

struct NotAnError {}
do throws(NotAnError) {} catch {}

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfthrowFeature → error handling: Throw statementstype checkerArea → compiler: Semantic analysistyped throwsFeature → error handling → throws & rethrows: Typed throws

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions