-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
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.
Skalman
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this