TypeScript/tests/cases/conformance/classes/constructorDeclarations/superCalls
Nathan Shively-Sanders 43fc19c958
Emit statements before super (#36417)
* Emit statements before super

When statements come before super, Typescript's emit is incorrect,
whether there is an error or not. This change preserves statements that
come before super whether there is an error or not.

Here is the case with no errors:

```ts
class Test extends Array {
  p: number
  constructor() {
    console.log("p is initialised in the constructor below super()")
    super()
    this.p = 1
  }
}
```

Notice that `p` is manually initialised in the constructor after
`super()` instead of at the property declaration.

* Update baselines

Parameter properties in the error case now move below the super call.
This is an improvement because it means the code is more likely to execute
correctly.

* remove outdated comments
2020-01-24 14:52:48 -08:00
..
derivedClassConstructorWithoutSuperCall.ts
derivedClassParameterProperties.ts
derivedClassSuperCallsInNonConstructorMembers.ts
derivedClassSuperCallsWithThisArg.ts
emitStatementsBeforeSuperCall.ts Emit statements before super (#36417) 2020-01-24 14:52:48 -08:00
emitStatementsBeforeSuperCallWithDefineFields.ts Emit statements before super (#36417) 2020-01-24 14:52:48 -08:00
superCallInConstructorWithNoBaseType.ts
superPropertyInConstructorBeforeSuperCall.ts