Skip to content

Fix description around it being an error if a *switch_expression_arm* is redundant #1656

Description

@Nigel-Ecma

Quoted comment is start of thread, whole thread relevant.


Is it not that some previous arm will always match but that the sum of all the previous arms match the whole domain, i.e. an arm is subsumed (§11.3) as with the switch statement (§13.8.3)?

Or is this not subsumption as it includes the guards?

Or does pattern subsumption (§11.3) need to be expanded to include guards?

Even if it is not subsumption I think it needs to be clear that it is the sum of all preceding arms.

Originally posted by @Nigel-Ecma in #873 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions