@kernlang/python 4.0.1-canary.222.1.f06f1a51 → 4.0.1-canary.224.1.1a92ac0a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -195,6 +195,19 @@ interface BodyEmitContext {
195
195
  * `gensymCounter` so closure names stay stable/independent of other
196
196
  * gensym usage. */
197
197
  closureSeq: number;
198
+ /** S5 review fix — CPython REJECTS the walrus operator anywhere inside a
199
+ * comprehension/generator ITERABLE expression ("assignment expression
200
+ * cannot be used in a comprehension iterable expression", a symtable check
201
+ * that NO amount of nesting — parens, calls, lambdas, list displays —
202
+ * escapes). Every site that interpolates an emitted expression into a
203
+ * `for … in <here>` head sets this flag (via `withWalrusBan`) while
204
+ * emitting that operand; every walrus-producing lowering (`&&`/`||`,
205
+ * impure-left `??`, `typeof`) checks it and emits the walrus-free
206
+ * lambda-parameter form instead: `(lambda __k_N: (<body using __k_N>))(L)`
207
+ * — same single-eval of L, same lazy unselected branch (the conditional
208
+ * lives in the lambda body), one extra closure allocation only in these
209
+ * rare positions. */
210
+ banWalrus?: boolean;
198
211
  /** Slice-2 loop-variable pinning. Each entry is the INDEX into `localScopes`
199
212
  * of a scope that is a loop BODY (an `each`/`for`/`while` body). A captured
200
213
  * name is pinned (JS per-iteration capture → Python default arg) IFF its