Commit 081f803
committed
Exclude async/await comprehensions from PEP 709 inlining in symboltable
Async comprehensions and comprehensions with await in the element
expression need their own coroutine scope and cannot be inlined.
The symboltable builder was not checking these conditions, causing
incorrect symbol scope resolution when an async comprehension was
nested inside an inlined comprehension (e.g. [[x async for x in g]
for j in items]).1 parent 1493a9b commit 081f803
1 file changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
302 | 322 | | |
303 | 323 | | |
304 | 324 | | |
| |||
2102 | 2122 | | |
2103 | 2123 | | |
2104 | 2124 | | |
| 2125 | + | |
| 2126 | + | |
2105 | 2127 | | |
2106 | 2128 | | |
2107 | | - | |
| 2129 | + | |
| 2130 | + | |
2108 | 2131 | | |
2109 | 2132 | | |
2110 | 2133 | | |
| |||
0 commit comments