Skip to content

Commit f10ee8a

Browse files
committed
[compiler] Infer types for properties after holes in array patterns (#34847)
In InferTypes when we infer types for properties during destructuring, we were breaking out of the loop when we encounter a hole in the array. Instead we should just skip that element and continue inferring later properties. Closes #34748 --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34847). * #34855 * __->__ #34847 DiffTrain build for [e096403](e096403)
1 parent 2bccf63 commit f10ee8a

35 files changed

+87
-87
lines changed

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48172,7 +48172,7 @@ function* generateInstructionTypes(env, names, instr) {
4817248172
});
4817348173
}
4817448174
else {
48175-
break;
48175+
continue;
4817648176
}
4817748177
}
4817848178
}

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b9ec735de248f46da181afbc12aa906422be0dba
1+
e096403c595d67b689473908a52979c76bbefb9e
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b9ec735de248f46da181afbc12aa906422be0dba
1+
e096403c595d67b689473908a52979c76bbefb9e

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ __DEV__ &&
14601460
exports.useTransition = function () {
14611461
return resolveDispatcher().useTransition();
14621462
};
1463-
exports.version = "19.3.0-www-classic-b9ec735d-20251013";
1463+
exports.version = "19.3.0-www-classic-e096403c-20251015";
14641464
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14651465
"function" ===
14661466
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ __DEV__ &&
14601460
exports.useTransition = function () {
14611461
return resolveDispatcher().useTransition();
14621462
};
1463-
exports.version = "19.3.0-www-modern-b9ec735d-20251013";
1463+
exports.version = "19.3.0-www-modern-e096403c-20251015";
14641464
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14651465
"function" ===
14661466
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,4 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.3.0-www-classic-b9ec735d-20251013";
609+
exports.version = "19.3.0-www-classic-e096403c-20251015";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,4 @@ exports.useSyncExternalStore = function (
606606
exports.useTransition = function () {
607607
return ReactSharedInternals.H.useTransition();
608608
};
609-
exports.version = "19.3.0-www-modern-b9ec735d-20251013";
609+
exports.version = "19.3.0-www-modern-e096403c-20251015";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ exports.useSyncExternalStore = function (
610610
exports.useTransition = function () {
611611
return ReactSharedInternals.H.useTransition();
612612
};
613-
exports.version = "19.3.0-www-classic-b9ec735d-20251013";
613+
exports.version = "19.3.0-www-classic-e096403c-20251015";
614614
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
615615
"function" ===
616616
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ exports.useSyncExternalStore = function (
610610
exports.useTransition = function () {
611611
return ReactSharedInternals.H.useTransition();
612612
};
613-
exports.version = "19.3.0-www-modern-b9ec735d-20251013";
613+
exports.version = "19.3.0-www-modern-e096403c-20251015";
614614
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
615615
"function" ===
616616
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20371,10 +20371,10 @@ __DEV__ &&
2037120371
(function () {
2037220372
var internals = {
2037320373
bundleType: 1,
20374-
version: "19.3.0-www-classic-b9ec735d-20251013",
20374+
version: "19.3.0-www-classic-e096403c-20251015",
2037520375
rendererPackageName: "react-art",
2037620376
currentDispatcherRef: ReactSharedInternals,
20377-
reconcilerVersion: "19.3.0-www-classic-b9ec735d-20251013"
20377+
reconcilerVersion: "19.3.0-www-classic-e096403c-20251015"
2037820378
};
2037920379
internals.overrideHookState = overrideHookState;
2038020380
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -20409,7 +20409,7 @@ __DEV__ &&
2040920409
exports.Shape = Shape;
2041020410
exports.Surface = Surface;
2041120411
exports.Text = Text;
20412-
exports.version = "19.3.0-www-classic-b9ec735d-20251013";
20412+
exports.version = "19.3.0-www-classic-e096403c-20251015";
2041320413
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2041420414
"function" ===
2041520415
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)