Bug Report
π Search Terms
class override
π Version & Regression Information
- This changed between versions 4.2.0 and nightly
β― Playground Link
Playground link with relevant code
π» Code
class B {
p1: number = 1;
p2: number = 2;
p3: number = 3;
p4: number = 4;
oop: number;
pp: number;
op: number;
}
class D extends B{
declare p1: number
override declare p2: number;
readonly override p3: number;
override readonly p4: number;
override static sp: number;
override override oop: number;
public override pp: number;
override public op: number;
override constructor () {
super();
}
}
π Actual behavior
I've tried the same code in playground with nightly version and with npm install typescript@next, and there's only one compilation error occurred: 'override' modifier already seen. . Other errors, such as 'public' modifier must precede 'override' modifier., 'static' modifier cannot be used with 'override' modifier. and etc. can't be reproduced as baselines in https://github.com/microsoft/TypeScript/blob/master/tests/baselines/reference/override5.errors.txt , so I'm not sure which one is correct.
Context: we're implementing parsing override syntax in swc: swc-project/swc#1541 .
π Expected behavior
Not sure. Stated as above.
Bug Report
π Search Terms
class override
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
I've tried the same code in playground with nightly version and with
npm install typescript@next, and there's only one compilation error occurred:'override' modifier already seen.. Other errors, such as'public' modifier must precede 'override' modifier.,'static' modifier cannot be used with 'override' modifier.and etc. can't be reproduced as baselines in https://github.com/microsoft/TypeScript/blob/master/tests/baselines/reference/override5.errors.txt , so I'm not sure which one is correct.Context: we're implementing parsing
overridesyntax in swc: swc-project/swc#1541 .π Expected behavior
Not sure. Stated as above.