control-flow-shadowed-names.ts 291 B

123456789
  1. // Two distinct symbols named x: the inner (tainted) one must flow out via out,
  2. // while the outer x is clean — checker symbols must not conflate.
  3. const x = "clean";
  4. let out = "";
  5. {
  6. const x = await agent("a").ask("secret");
  7. out = x;
  8. }
  9. return agent("b").ask(`inner ${out} outer ${x}`);