Commit 176b052
authored
Fix crash in match statement with unmatchable ClassPattern (#13731)
Fixes #12886
`contract_starred_pattern_types` and `expand_starred_pattern_types` are
sort of like inverses of each other, so you get crashes if
`contracted_inner_types` and `contracted_new_inner_types` don't
correspond (in the case that `can_match` gets set to `False`).
I'm not sure `can_match` is doing anything useful, so this
PR now just gets rid of it.1 parent 6a4c2c8 commit 176b052
2 files changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 263 | + | |
| 264 | + | |
269 | 265 | | |
| 266 | + | |
270 | 267 | | |
271 | 268 | | |
272 | 269 | | |
| |||
279 | 276 | | |
280 | 277 | | |
281 | 278 | | |
282 | | - | |
283 | | - | |
284 | | - | |
| 279 | + | |
285 | 280 | | |
286 | 281 | | |
287 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
320 | 335 | | |
321 | 336 | | |
322 | 337 | | |
| |||
0 commit comments