Skip to content

python: wildcard case is not default case - #22526

Draft
yoff wants to merge 1 commit into
github:mainfrom
yoff:python/wildcard-is-not-default-case
Draft

python: wildcard case is not default case#22526
yoff wants to merge 1 commit into
github:mainfrom
yoff:python/wildcard-is-not-default-case

Conversation

@yoff

@yoff yoff commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

A wildcard case (case _:) should not be considered default as the CFG library will then order it last.
Instead it is a matchAll. Revealed by #22510.

A wildcard case (`case _:`) should not be considered default
as the CFG library will then order it last.
Instead it is a `matchAll`
}

/** A wildcard case (`case _:`) will match all values. */
predicate matchAll(Ast::Case c) { c.isWildcard() }
@github-actions github-actions Bot added the Python label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants