mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fix(react-compiler): implement NumericLiteral as ObjectPropertyKey (#31791)
DiffTrain build for [90b511ec7a](https://github.com/facebook/react/commit/90b511ec7a9f2f3fd2b7f0039d8fc52c23f573a1)
This commit is contained in:
@@ -29533,6 +29533,9 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||
case "computed": {
|
||||
return "[".concat(printPlace(key.name), "]");
|
||||
}
|
||||
case "number": {
|
||||
return String(key.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
function printInstructionValue(instrValue) {
|
||||
@@ -35935,6 +35938,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||
return { kind: "computed", name: place };
|
||||
} else if (key.isIdentifier()) {
|
||||
return { kind: "identifier", name: key.node.name };
|
||||
} else if (key.isNumericLiteral()) {
|
||||
return { kind: "identifier", name: String(key.node.value) };
|
||||
}
|
||||
builder.errors.push({
|
||||
reason: "(BuildHIR::lowerExpression) Expected Identifier, got ".concat(
|
||||
@@ -54070,6 +54075,9 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||
});
|
||||
return expr;
|
||||
}
|
||||
case "number": {
|
||||
return libExports.numericLiteral(key.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
function codegenArrayPattern(cx, pattern) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
02372952e4f24fa02dcb9b32af26cb2472617cef
|
||||
90b511ec7a9f2f3fd2b7f0039d8fc52c23f573a1
|
||||
|
||||
@@ -1 +1 @@
|
||||
02372952e4f24fa02dcb9b32af26cb2472617cef
|
||||
90b511ec7a9f2f3fd2b7f0039d8fc52c23f573a1
|
||||
|
||||
Reference in New Issue
Block a user