Poor diagnostic for misspelled enum case name in catch clause #72505
Labels
associated values
Feature → enums: enum cases with associated values (payload)
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
enum case patterns
Feature → patterns: Enumeration case patterns
enum cases
Feature → enums: Enum cases
enum
Feature → type declarations: Swift enumeration declarations
patterns
Feature: patterns
swift 6.0
type checker
Area → compiler: Semantic analysis
wildcard pattern
Feature → patterns: The wildcard (underscore) pattern
Description
No response
Reproduction
Expected behavior
type 'MyError' has no member 'notFirstError'
, which is what you get if you drop the(_)
.Environment
Swift version 6.0-dev (LLVM 4d3f797c4fe4835, Swift 784a7c5)
(via swift.godbolt.org)
Additional information
Also occurs in
switch
cases, unsurprisingly.catch
clauses are just where I ran into it.Extra search tags: underscore, payload
The text was updated successfully, but these errors were encountered: