TypeScript/tests/cases/conformance/classes/constructorDeclarations
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
..
automaticConstructors Add snapshot of compiler sources 2014-07-12 17:30:19 -07:00
constructorParameters Update baselines 2016-09-15 09:21:14 -07:00
superCalls Emit statements before super (#36417) 2020-01-24 14:52:48 -08:00
classConstructorAccessibility.ts Added and updated tests for constructor visibility 2016-02-03 22:48:33 +00:00
classConstructorAccessibility2.ts Protected constructors now accessible everywhere in subclasses 2016-07-22 17:38:25 -07:00
classConstructorAccessibility3.ts Accept baselines 2016-02-04 21:00:50 +00:00
classConstructorAccessibility4.ts Updated tests and accepted baseline 2016-02-13 02:52:25 +00:00
classConstructorAccessibility5.ts Test that protected constructors are accessible 2016-07-22 13:38:45 -07:00
classConstructorOverloadsAccessibility.ts Added and updated tests for constructor visibility 2016-02-03 22:48:33 +00:00
classConstructorParametersAccessibility.ts Added protected conformance tests 2014-09-23 11:22:38 -07:00
classConstructorParametersAccessibility2.ts Added protected conformance tests 2014-09-23 11:22:38 -07:00
classConstructorParametersAccessibility3.ts Added protected conformance tests 2014-09-23 11:22:38 -07:00
classWithTwoConstructorDefinitions.ts Update baselines 2014-09-30 18:09:55 -07:00
constructorWithAssignableReturnExpression.ts Add snapshot of compiler sources 2014-07-12 17:30:19 -07:00
constructorWithExpressionLessReturn.ts Add snapshot of compiler sources 2014-07-12 17:30:19 -07:00
quotedConstructors.ts Parse quoted constructors as constructors, not methods (#31949) 2019-07-12 14:01:57 -07:00