Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/nested-function-discovery-while-test-expr.expect.md
2026-08-27 21:09:14 +00:00

574 B

Input

// @compilationMode:"annotation"
while (
  function useFoo() {
    'use memo';
    return [1, 2, 3];
  }
) {
  break;
}

Code

import { c as _c } from "react/compiler-runtime"; // @compilationMode:"annotation"
while (
  function useFoo() {
    "use memo";
    const $ = _c(1);
    let t0;
    if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
      t0 = [1, 2, 3];
      $[0] = t0;
    } else {
      t0 = $[0];
    }
    return t0;
  }
) {
  break;
}

Eval output

(kind: exception) Fixture not implemented