functions-summaries-iife.ts 394 B

1234567
  1. // IIFE: an inline arrow invoked immediately with a tainted actual. The parenthesized
  2. // arrow is a direct callee, so the param binding should stay exact.
  3. // Expected: ask#1 -> ask#2 data exact; ask#2 -> sink data exact.
  4. const judge = agent("judge");
  5. const secret = await agent("s").ask<string>("secret");
  6. const out = await ((x: string) => judge.ask<string>(`judge ${x}`))(secret);
  7. return out;