@@ -494,26 +494,26 @@ module API {
494494 // - `awaitedValue` is `x`
495495 // - `result` is `await x`
496496 exists ( Await await |
497- result . asExpr ( ) = await and
498- await . getValue ( ) = awaitedValue . asExpr ( )
497+ await . getValue ( ) = awaitedValue . asExpr ( ) and
498+ result . asExpr ( ) = await
499499 )
500500 or
501501 // `async for x in l`
502502 // - `awaitedValue` is `l`
503- // - `result` is `l` (should perhaps be `x`, but that should really be a read)
503+ // - `result` is `l` (`x` is behind a read step )
504504 exists ( AsyncFor asyncFor |
505- result .asExpr ( ) = asyncFor .getIter ( ) and
506505 // To consider `x` the result of awaiting, we would use asyncFor.getTarget() = awaitedValue.asExpr(),
507506 // but that is behind a read step rather than a flow step.
508- asyncFor .getIter ( ) = awaitedValue .asExpr ( )
507+ asyncFor .getIter ( ) = awaitedValue .asExpr ( ) and
508+ result .asExpr ( ) = asyncFor .getIter ( )
509509 )
510510 or
511511 // `async with x as y`
512512 // - `awaitedValue` is `x`
513513 // - `result` is `x` and `y` if it exists
514514 exists ( AsyncWith asyncWith |
515- result .asExpr ( ) = asyncWith .getContextExpr ( ) and
516- awaitedValue .asExpr ( ) in [
515+ awaitedValue .asExpr ( ) = asyncWith .getContextExpr ( ) and
516+ result .asExpr ( ) in [
517517 // `x`
518518 asyncWith .getContextExpr ( ) ,
519519 // `y`, if it exists
0 commit comments