-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Keep dependent destructuring narrowing during re-entrant checks #4606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Ryan Cavanaugh (RyanCavanaugh)
merged 10 commits into
microsoft:main
from
Andarist:fix/reentrant-dependent-desructuring
Jul 22, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
94a0a5a
Keep dependent destructuring narrowing during re-entrant checks
Andarist f4cf215
hybrid
Andarist b913a06
fix the crossfile issue
Andarist 88a82ff
fix deferred case
Andarist ca9b0db
fix extra thing
Andarist 611f9ea
simplify
Andarist ef941fa
add comment
Andarist 24fda95
add test
Andarist be7f316
Merge branch 'main' into fix/reentrant-dependent-desructuring
Andarist 68af56e
update baseline
Andarist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...baselines/reference/compiler/controlFlowDependentDestructuringOverloadedAssertion.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| //// [tests/cases/compiler/controlFlowDependentDestructuringOverloadedAssertion.ts] //// | ||
|
|
||
| === controlFlowDependentDestructuringOverloadedAssertion.ts === | ||
| // https://github.com/microsoft/typescript-go/issues/4572 | ||
|
|
||
| type State = | ||
| >State : Symbol(State, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 0, 0)) | ||
|
|
||
| | { status: "ready"; payload: { value?: string } } | ||
| >status : Symbol(status, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 5)) | ||
| >payload : Symbol(payload, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 22)) | ||
| >value : Symbol(value, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 33)) | ||
|
|
||
| | { status: "pending"; payload?: undefined }; | ||
| >status : Symbol(status, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 4, 5)) | ||
| >payload : Symbol(payload, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 4, 24)) | ||
|
|
||
| declare function getState(): State; | ||
| >getState : Symbol(getState, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 4, 47)) | ||
| >State : Symbol(State, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 0, 0)) | ||
|
|
||
| declare function assert(condition: boolean): asserts condition; | ||
| >assert : Symbol(assert, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 6, 35), Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 7, 63)) | ||
| >condition : Symbol(condition, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 7, 24)) | ||
| >condition : Symbol(condition, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 7, 24)) | ||
|
|
||
| declare function assert(condition: boolean, message: string): asserts condition; | ||
| >assert : Symbol(assert, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 6, 35), Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 7, 63)) | ||
| >condition : Symbol(condition, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 8, 24)) | ||
| >message : Symbol(message, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 8, 43)) | ||
| >condition : Symbol(condition, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 8, 24)) | ||
|
|
||
| const readValue = () => { | ||
| >readValue : Symbol(readValue, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 10, 5)) | ||
|
|
||
| const { status, payload } = getState(); | ||
| >status : Symbol(status, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 11, 9)) | ||
| >payload : Symbol(payload, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 11, 17)) | ||
| >getState : Symbol(getState, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 4, 47)) | ||
|
|
||
| if (status !== "ready") throw new Error("Value is not ready."); | ||
| >status : Symbol(status, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 11, 9)) | ||
| >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) | ||
|
|
||
| assert(payload.value !== undefined); | ||
| >assert : Symbol(assert, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 6, 35), Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 7, 63)) | ||
| >payload.value : Symbol(value, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 33)) | ||
| >payload : Symbol(payload, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 11, 17)) | ||
| >value : Symbol(value, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 33)) | ||
| >undefined : Symbol(undefined) | ||
|
|
||
| return payload.value; | ||
| >payload.value : Symbol(value, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 33)) | ||
| >payload : Symbol(payload, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 11, 17)) | ||
| >value : Symbol(value, Decl(controlFlowDependentDestructuringOverloadedAssertion.ts, 3, 33)) | ||
|
|
||
| }; | ||
|
|
63 changes: 63 additions & 0 deletions
63
...a/baselines/reference/compiler/controlFlowDependentDestructuringOverloadedAssertion.types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| //// [tests/cases/compiler/controlFlowDependentDestructuringOverloadedAssertion.ts] //// | ||
|
|
||
| === controlFlowDependentDestructuringOverloadedAssertion.ts === | ||
| // https://github.com/microsoft/typescript-go/issues/4572 | ||
|
|
||
| type State = | ||
| >State : State | ||
|
|
||
| | { status: "ready"; payload: { value?: string } } | ||
| >status : "ready" | ||
| >payload : { value?: string; } | ||
| >value : string | undefined | ||
|
|
||
| | { status: "pending"; payload?: undefined }; | ||
| >status : "pending" | ||
| >payload : undefined | ||
|
|
||
| declare function getState(): State; | ||
| >getState : () => State | ||
|
|
||
| declare function assert(condition: boolean): asserts condition; | ||
| >assert : { (condition: boolean): asserts condition; (condition: boolean, message: string): asserts condition; } | ||
| >condition : boolean | ||
|
|
||
| declare function assert(condition: boolean, message: string): asserts condition; | ||
| >assert : { (condition: boolean): asserts condition; (condition: boolean, message: string): asserts condition; } | ||
| >condition : boolean | ||
| >message : string | ||
|
|
||
| const readValue = () => { | ||
| >readValue : () => string | ||
| >() => { const { status, payload } = getState(); if (status !== "ready") throw new Error("Value is not ready."); assert(payload.value !== undefined); return payload.value;} : () => string | ||
|
|
||
| const { status, payload } = getState(); | ||
| >status : "pending" | "ready" | ||
| >payload : { value?: string; } | undefined | ||
| >getState() : State | ||
| >getState : () => State | ||
|
|
||
| if (status !== "ready") throw new Error("Value is not ready."); | ||
| >status !== "ready" : boolean | ||
| >status : "pending" | "ready" | ||
| >"ready" : "ready" | ||
| >new Error("Value is not ready.") : Error | ||
| >Error : ErrorConstructor | ||
| >"Value is not ready." : "Value is not ready." | ||
|
|
||
| assert(payload.value !== undefined); | ||
| >assert(payload.value !== undefined) : void | ||
| >assert : { (condition: boolean): asserts condition; (condition: boolean, message: string): asserts condition; } | ||
| >payload.value !== undefined : boolean | ||
| >payload.value : string | undefined | ||
| >payload : { value?: string; } | ||
| >value : string | undefined | ||
| >undefined : undefined | ||
|
|
||
| return payload.value; | ||
| >payload.value : string | ||
| >payload : { value?: string; } | ||
| >value : string | ||
|
|
||
| }; | ||
|
|
62 changes: 62 additions & 0 deletions
62
...data/baselines/reference/compiler/dependentDestructuringBindingElementInitializer.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| //// [tests/cases/compiler/dependentDestructuringBindingElementInitializer.ts] //// | ||
|
|
||
| === dependentDestructuringBindingElementInitializer.ts === | ||
| type U = | ||
| >U : Symbol(U, Decl(dependentDestructuringBindingElementInitializer.ts, 0, 0)) | ||
|
|
||
| | { kind: "a"; payload: number; extra?: unknown } | ||
| >kind : Symbol(kind, Decl(dependentDestructuringBindingElementInitializer.ts, 1, 7)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 1, 18)) | ||
| >extra : Symbol(extra, Decl(dependentDestructuringBindingElementInitializer.ts, 1, 35)) | ||
|
|
||
| | { kind: "b"; payload: string; extra?: unknown }; | ||
| >kind : Symbol(kind, Decl(dependentDestructuringBindingElementInitializer.ts, 2, 7)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 2, 18)) | ||
| >extra : Symbol(extra, Decl(dependentDestructuringBindingElementInitializer.ts, 2, 35)) | ||
|
|
||
| declare const u: U; | ||
| >u : Symbol(u, Decl(dependentDestructuringBindingElementInitializer.ts, 4, 13)) | ||
| >U : Symbol(U, Decl(dependentDestructuringBindingElementInitializer.ts, 0, 0)) | ||
|
|
||
| const { | ||
| kind, | ||
| >kind : Symbol(kind, Decl(dependentDestructuringBindingElementInitializer.ts, 6, 7)) | ||
|
|
||
| payload, | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 7, 9)) | ||
|
|
||
| extra = kind === "a" ? payload.toFixed() : payload.toUpperCase(), | ||
| >extra : Symbol(extra, Decl(dependentDestructuringBindingElementInitializer.ts, 8, 12)) | ||
| >kind : Symbol(kind, Decl(dependentDestructuringBindingElementInitializer.ts, 6, 7)) | ||
| >payload.toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 7, 9)) | ||
| >toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
| >payload.toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 7, 9)) | ||
| >toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) | ||
|
|
||
| } = u; | ||
| >u : Symbol(u, Decl(dependentDestructuringBindingElementInitializer.ts, 4, 13)) | ||
|
|
||
| function f({ | ||
| >f : Symbol(f, Decl(dependentDestructuringBindingElementInitializer.ts, 10, 6)) | ||
|
|
||
| kind, | ||
| >kind : Symbol(kind, Decl(dependentDestructuringBindingElementInitializer.ts, 12, 12)) | ||
|
|
||
| payload, | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 13, 9)) | ||
|
|
||
| extra = kind === "a" ? payload.toFixed() : payload.toUpperCase(), | ||
| >extra : Symbol(extra, Decl(dependentDestructuringBindingElementInitializer.ts, 14, 12)) | ||
| >kind : Symbol(kind, Decl(dependentDestructuringBindingElementInitializer.ts, 12, 12)) | ||
| >payload.toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 13, 9)) | ||
| >toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
| >payload.toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringBindingElementInitializer.ts, 13, 9)) | ||
| >toUpperCase : Symbol(String.toUpperCase, Decl(lib.es5.d.ts, --, --)) | ||
|
|
||
| }: U) {} | ||
| >U : Symbol(U, Decl(dependentDestructuringBindingElementInitializer.ts, 0, 0)) | ||
|
|
70 changes: 70 additions & 0 deletions
70
testdata/baselines/reference/compiler/dependentDestructuringBindingElementInitializer.types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| //// [tests/cases/compiler/dependentDestructuringBindingElementInitializer.ts] //// | ||
|
|
||
| === dependentDestructuringBindingElementInitializer.ts === | ||
| type U = | ||
| >U : U | ||
|
|
||
| | { kind: "a"; payload: number; extra?: unknown } | ||
| >kind : "a" | ||
| >payload : number | ||
| >extra : unknown | ||
|
|
||
| | { kind: "b"; payload: string; extra?: unknown }; | ||
| >kind : "b" | ||
| >payload : string | ||
| >extra : unknown | ||
|
|
||
| declare const u: U; | ||
| >u : U | ||
|
|
||
| const { | ||
| kind, | ||
| >kind : "a" | "b" | ||
|
|
||
| payload, | ||
| >payload : string | number | ||
|
|
||
| extra = kind === "a" ? payload.toFixed() : payload.toUpperCase(), | ||
| >extra : unknown | ||
| >kind === "a" ? payload.toFixed() : payload.toUpperCase() : string | ||
| >kind === "a" : boolean | ||
| >kind : "a" | "b" | ||
| >"a" : "a" | ||
| >payload.toFixed() : string | ||
| >payload.toFixed : (fractionDigits?: number) => string | ||
| >payload : number | ||
| >toFixed : (fractionDigits?: number) => string | ||
| >payload.toUpperCase() : string | ||
| >payload.toUpperCase : () => string | ||
| >payload : string | ||
| >toUpperCase : () => string | ||
|
|
||
| } = u; | ||
| >u : U | ||
|
|
||
| function f({ | ||
| >f : ({ kind, payload, extra, }: U) => void | ||
|
|
||
| kind, | ||
| >kind : "a" | "b" | ||
|
|
||
| payload, | ||
| >payload : string | number | ||
|
|
||
| extra = kind === "a" ? payload.toFixed() : payload.toUpperCase(), | ||
| >extra : unknown | ||
| >kind === "a" ? payload.toFixed() : payload.toUpperCase() : string | ||
| >kind === "a" : boolean | ||
| >kind : "a" | "b" | ||
| >"a" : "a" | ||
| >payload.toFixed() : string | ||
| >payload.toFixed : (fractionDigits?: number) => string | ||
| >payload : number | ||
| >toFixed : (fractionDigits?: number) => string | ||
| >payload.toUpperCase() : string | ||
| >payload.toUpperCase : () => string | ||
| >payload : string | ||
| >toUpperCase : () => string | ||
|
|
||
| }: U) {} | ||
|
|
32 changes: 32 additions & 0 deletions
32
testdata/baselines/reference/compiler/dependentDestructuringCrossFilePosition.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| //// [tests/cases/compiler/dependentDestructuringCrossFilePosition.ts] //// | ||
|
|
||
| === types.d.ts === | ||
| type U = | ||
| >U : Symbol(U, Decl(types.d.ts, 0, 0)) | ||
|
|
||
| | { kind: "a"; payload: number } | ||
| >kind : Symbol(kind, Decl(types.d.ts, 1, 7)) | ||
| >payload : Symbol(payload, Decl(types.d.ts, 1, 18)) | ||
|
|
||
| | { kind: "b"; payload: string }; | ||
| >kind : Symbol(kind, Decl(types.d.ts, 2, 7)) | ||
| >payload : Symbol(payload, Decl(types.d.ts, 2, 18)) | ||
|
|
||
| declare function make(): U; | ||
| >make : Symbol(make, Decl(types.d.ts, 2, 37)) | ||
| >U : Symbol(U, Decl(types.d.ts, 0, 0)) | ||
|
|
||
| === a.ts === | ||
| const { kind, payload }: U = make(); | ||
| >kind : Symbol(kind, Decl(a.ts, 0, 7)) | ||
| >payload : Symbol(payload, Decl(a.ts, 0, 13)) | ||
| >U : Symbol(U, Decl(types.d.ts, 0, 0)) | ||
| >make : Symbol(make, Decl(types.d.ts, 2, 37)) | ||
|
|
||
| === b.ts === | ||
| if (kind === "a") payload.toFixed(); | ||
| >kind : Symbol(kind, Decl(a.ts, 0, 7)) | ||
| >payload.toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
| >payload : Symbol(payload, Decl(a.ts, 0, 13)) | ||
| >toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
|
|
34 changes: 34 additions & 0 deletions
34
testdata/baselines/reference/compiler/dependentDestructuringCrossFilePosition.types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| //// [tests/cases/compiler/dependentDestructuringCrossFilePosition.ts] //// | ||
|
|
||
| === types.d.ts === | ||
| type U = | ||
| >U : U | ||
|
|
||
| | { kind: "a"; payload: number } | ||
| >kind : "a" | ||
| >payload : number | ||
|
|
||
| | { kind: "b"; payload: string }; | ||
| >kind : "b" | ||
| >payload : string | ||
|
|
||
| declare function make(): U; | ||
| >make : () => U | ||
|
|
||
| === a.ts === | ||
| const { kind, payload }: U = make(); | ||
| >kind : "a" | "b" | ||
| >payload : string | number | ||
| >make() : U | ||
| >make : () => U | ||
|
|
||
| === b.ts === | ||
| if (kind === "a") payload.toFixed(); | ||
| >kind === "a" : boolean | ||
| >kind : "a" | "b" | ||
| >"a" : "a" | ||
| >payload.toFixed() : string | ||
| >payload.toFixed : (fractionDigits?: number) => string | ||
| >payload : number | ||
| >toFixed : (fractionDigits?: number) => string | ||
|
|
40 changes: 40 additions & 0 deletions
40
testdata/baselines/reference/compiler/dependentDestructuringDeferredCallback.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| //// [tests/cases/compiler/dependentDestructuringDeferredCallback.ts] //// | ||
|
|
||
| === dependentDestructuringDeferredCallback.ts === | ||
| type U = | ||
| >U : Symbol(U, Decl(dependentDestructuringDeferredCallback.ts, 0, 0)) | ||
|
|
||
| | { kind: "a"; payload: number; callback: () => void } | ||
| >kind : Symbol(kind, Decl(dependentDestructuringDeferredCallback.ts, 1, 7)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringDeferredCallback.ts, 1, 18)) | ||
| >callback : Symbol(callback, Decl(dependentDestructuringDeferredCallback.ts, 1, 35)) | ||
|
|
||
| | { kind: "b"; payload: string; callback: () => void }; | ||
| >kind : Symbol(kind, Decl(dependentDestructuringDeferredCallback.ts, 2, 7)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringDeferredCallback.ts, 2, 18)) | ||
| >callback : Symbol(callback, Decl(dependentDestructuringDeferredCallback.ts, 2, 35)) | ||
|
|
||
| const { kind, payload, callback }: U = { | ||
| >kind : Symbol(kind, Decl(dependentDestructuringDeferredCallback.ts, 4, 7)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringDeferredCallback.ts, 4, 13)) | ||
| >callback : Symbol(callback, Decl(dependentDestructuringDeferredCallback.ts, 4, 22)) | ||
| >U : Symbol(U, Decl(dependentDestructuringDeferredCallback.ts, 0, 0)) | ||
|
|
||
| kind: "a", | ||
| >kind : Symbol(kind, Decl(dependentDestructuringDeferredCallback.ts, 4, 40)) | ||
|
|
||
| payload: 1, | ||
| >payload : Symbol(payload, Decl(dependentDestructuringDeferredCallback.ts, 5, 14)) | ||
|
|
||
| callback: () => { | ||
| >callback : Symbol(callback, Decl(dependentDestructuringDeferredCallback.ts, 6, 15)) | ||
|
|
||
| if (kind === "a") payload.toFixed(); | ||
| >kind : Symbol(kind, Decl(dependentDestructuringDeferredCallback.ts, 4, 7)) | ||
| >payload.toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
| >payload : Symbol(payload, Decl(dependentDestructuringDeferredCallback.ts, 4, 13)) | ||
| >toFixed : Symbol(Number.toFixed, Decl(lib.es5.d.ts, --, --)) | ||
|
|
||
| }, | ||
| }; | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2542 pushed this to the latter line - and that's what broke the reported case
But now, thanks to the introduced
rootInitializercheck, we just never enter this entire branch. It seems to me that thanks to that we can push back this flag reset to an earlier spot (that is required to fix one of the tests I added as part of this PR)