Commit 1e7aa9a
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 e3932b4 commit 1e7aa9a
1 file changed
+25
-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 | + | |
| 2131 | + | |
2108 | 2132 | | |
2109 | 2133 | | |
2110 | 2134 | | |
| |||
0 commit comments