1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
tests/cases/conformance/classes/classExpressions/classWithStaticFieldInParameterInitializer.2.ts(3,21): error TS2373: Parameter 'b' cannot reference identifier 'C' declared after it.
tests/cases/conformance/classes/classExpressions/classWithStaticFieldInParameterInitializer.2.ts(6,45): error TS2373: Parameter 'd' cannot reference identifier 'x' declared after it.
==== tests/cases/conformance/classes/classExpressions/classWithStaticFieldInParameterInitializer.2.ts (2 errors) ====
// https://github.com/microsoft/TypeScript/issues/36295
class C {}
((b = class extends C { static x = 1 }) => { var C; })();
~
!!! error TS2373: Parameter 'b' cannot reference identifier 'C' declared after it.
const x = "";
((b = class extends C { static x = 1 }, d = x) => { var x; })();
~
!!! error TS2373: Parameter 'd' cannot reference identifier 'x' declared after it.
|