You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uninitialized local check still permits provably erroneous use-before-assign in closureΒ #60181
changed the title [-]Uninitialized local permits provably erroneous use-before-assign[/-][+]Uninitialized local still permits provably erroneous use-before-assign in closure[/+]on Oct 9, 2024
Ryan Cavanaugh (@RyanCavanaugh) Sorry to ping, but I see the label has changed to "Awaiting More Feedback" but there's no other discussion. Is there anything you need from me or is discussion waiting on something else?
changed the title [-]Uninitialized local still permits provably erroneous use-before-assign in closure[/-][+]Uninitialized local check still permits provably erroneous use-before-assign in closure[/+]on Oct 12, 2024
classDataProcessor{privateprocessedData: string;constructor(data: string){if(data.length>0){this.processedData=this.process(data);}// Still missing initialization for the empty data case}logProcessedData(){console.log(this.processedData);// We should get error in TypeScript 5.7: Variable 'processedData' is used before it is assigned.}}
Activity
[-]Uninitialized local permits provably erroneous use-before-assign[/-][+]Uninitialized local still permits provably erroneous use-before-assign in closure[/+]kirkwaiblinger commentedon Oct 11, 2024
Ryan Cavanaugh (@RyanCavanaugh) Sorry to ping, but I see the label has changed to "Awaiting More Feedback" but there's no other discussion. Is there anything you need from me or is discussion waiting on something else?
RyanCavanaugh commentedon Oct 11, 2024
Neither? For feedback like this we would be wanting to hear from more than one person encountering a particular kind of situation.
kirkwaiblinger commentedon Oct 11, 2024
Ah, gotcha, ok. I misunderstood what the label meant. Thanks for clarifying!
[-]Uninitialized local still permits provably erroneous use-before-assign in closure[/-][+]Uninitialized local check still permits provably erroneous use-before-assign in closure[/+]horberlan commentedon Oct 22, 2024
kirkwaiblinger commentedon Oct 22, 2024
poisnada (@horberlan) That does have the error, just on the
private processedDataline, though, right? I see that error in the playground