mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
c41d2a569e
BigInt object keys fell through generic unsupported-key handling. Lower them through the exact parser-provided decimal string, preserving alternate bases and values beyond Number precision. Validated with `just ready`. AI-assisted. <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
24 lines
430 B
Plaintext
24 lines
430 B
Plaintext
---
|
|
source: crates/oxc_react_compiler/tests/snapshot.rs
|
|
input_file: crates/oxc_react_compiler/fixtures/bigint-object-keys.js
|
|
---
|
|
import { c as _c } from "react/compiler-runtime";
|
|
function component(value) {
|
|
const $ = _c(2);
|
|
let t0;
|
|
if ($[0] !== value) {
|
|
t0 = {
|
|
"1": value,
|
|
"16": value,
|
|
"8": value,
|
|
"2": value,
|
|
"9007199254740993": value
|
|
};
|
|
$[0] = value;
|
|
$[1] = t0;
|
|
} else {
|
|
t0 = $[1];
|
|
}
|
|
return t0;
|
|
}
|