| 1 | // @enablePreserveExistingMemoizationGuarantees:false |
| 2 | // bar(props.b) is an allocating expression that produces a primitive, which means |
| 3 | // that Forget should memoize it. |
| 4 | // Correctness: |
| 5 | // - y depends on either bar(props.b) or bar(props.b) + 1 |
| 6 | function AllocatingPrimitiveAsDep(props) { |
| 7 | let y = foo(bar(props).b + 1); |
| 8 | return y; |
| 9 | } |