Copilot
aa8402d1b7
Python: wire match-pattern bindings into the shared CFG (green)
Adds concrete `Pattern` subclasses in `AstNodeImpl.qll` for every
`MatchPattern` AST kind, with `getChild` overrides that expose
sub-patterns and bound Names. Specifically:
- MatchCapturePattern (`case x:`) -> getVariable()
- MatchAsPattern (`case … as v:`) -> getPattern(), getAlias()
- MatchStarPattern (`case [*rest]:`) -> getTarget()
- MatchSequencePattern (`case [a, b]:`) -> getPattern(i)
- MatchClassPattern (`case Cls(p, q, k=v)`) -> getClass(), positional, keyword
- MatchMappingPattern (`case {k: v}:`) -> getMapping(i)
- MatchKeyValuePattern, MatchKeywordPattern, MatchDoubleStarPattern
- MatchOrPattern, MatchLiteralPattern, MatchValuePattern
Without these, every Name bound by a match pattern lacked a CFG node.
Removes the corresponding MISSING: annotations from match_pattern.py
(all 11 cases).
Verified: all 24 ControlFlow/evaluation-order tests still pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-12 13:11:18 +00:00
..
2026-03-04 14:12:42 +00:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2023-11-15 10:10:23 +01:00
2020-07-07 15:43:52 +02:00
2026-04-14 13:27:31 +02:00
2026-05-12 13:11:18 +00:00
2026-04-17 13:16:46 +00:00
2020-03-30 11:59:10 +02:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2020-07-07 15:43:52 +02:00
2024-12-12 13:54:30 +01:00
2025-11-26 12:30:31 +00:00
2024-04-22 12:00:09 +00:00
2022-11-22 14:46:29 +01:00
2022-08-24 16:51:50 +01:00
2026-03-04 14:12:42 +00:00
2023-11-15 10:10:23 +01:00
2024-12-12 13:54:30 +01:00
2022-08-24 16:51:50 +01:00
2024-04-22 12:00:09 +00:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2020-07-07 15:43:52 +02:00
2024-04-22 12:00:09 +00:00
2023-11-06 13:50:55 +00:00
2025-11-26 12:30:31 +00:00
2026-03-04 13:11:38 +00:00
2026-03-04 12:45:05 +00:00
2020-03-30 11:59:10 +02:00
2025-11-26 12:30:31 +00:00
2023-11-15 10:10:23 +01:00
2025-11-26 12:30:31 +00:00
2024-08-19 10:54:48 +02:00
2024-09-16 14:30:55 +02:00
2025-11-26 12:30:31 +00:00
2023-07-07 11:54:50 +02:00
2023-04-26 13:41:57 +02:00
2020-02-06 14:28:10 +01:00