Repository: TypeScript
Issue: Incorrect class #private fields initialization order with target ES2022 and useDefineForClassFields set to false 
Labels: Needs Investigation

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->
ES2022 class field initialization order
private fields order
useDefineForClassFields false

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This changed between versions 4.9.5 and 5.0.4

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[5.0.4 with runtime error (useDefineForClassFields: false, target: ES2022)](https://www.typescriptlang.org/play?downlevelIteration=true&noLib=true&noStrictGenericChecks=true&importHelpers=true&target=9&jsx=0&module=7&suppressImplicitAnyIndexErrors=false&suppressExcessPropertyErrors=false&noImplicitUseStrict=false&keyofStringsOnly=false&stripInternal=false&isolatedModules=false&allowSyntheticDefaultImports=true&verbatimModuleSyntax=false&ts=5.0.4&useDefineForClassFields=false#code/MYGwhgzhAEBCCuAvR0DeAoaXoHcD2O0AvNAOR4B2ApqegL7rqiQwBieea0m2AxAEZgATsWgAXABYBLCADp+SWfhwBuHlmCUIYofGBi8QgBQAHIVIBuYMVWgLEALjhJEASjQMG6aoXZ4jPs7IRq6uQA)

[4.9.5 without runtime error (useDefineForClassFields: false, target: ES2022)](https://www.typescriptlang.org/play?downlevelIteration=true&noLib=true&noStrictGenericChecks=true&importHelpers=true&target=9&jsx=0&module=7&suppressImplicitAnyIndexErrors=false&suppressExcessPropertyErrors=false&noImplicitUseStrict=false&keyofStringsOnly=false&stripInternal=false&isolatedModules=false&allowSyntheticDefaultImports=true&ts=4.9.5&verbatimModuleSyntax=false&useDefineForClassFields=false#code/MYGwhgzhAEBCCuAvR0DeAoaXoHcD2O0AvNAOR4B2ApqegL7rqiQwBieea0m2AxAEZgATsWgAXABYBLCADp+SWfhwBuHlmCUIYofGBi8QgBQAHIVIBuYMVWgLEALjhJEASjQMG6aoXZ4jPs7IRq6uQA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
class Buzz {
    wow = 'one'
}

class Foo { 
    #bar = this.buz.wow;
    constructor(private buz: Buzz) {}
}

new Foo(new Buzz())
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
With 5.0.4 and useDefineForClassFields: false, target: ES2022 the above code fails in runtime because `#bar = this.buz.wow;` stays initialized before constructor, this doesn't happen if "normal private" is used (`private bar = this.buz.wow;`). Such construct works without issues on 4.9.5.

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->
The initialization is done in the same way as on 4.9.5.