You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Different behaviors between actual compiler and baselines of class member override. #43533
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 .
Activity
andrewbranch commentedon Apr 5, 2021
It looks like all those errors depend on
--noImplicitOverridebeing enabled. I don’t know why that would be the case—it seems like all the grammar checking should happen regardless of the flag. Also, was it intentional that the order of modifiers betweenoverrideandreadonlyisn’t enforced? /cc Daniel Rosenwasser (@DanielRosenwasser) Wenlu Wang (@Kingwl)DanielRosenwasser commentedon Apr 5, 2021
I think
overrideshould precedereadonly.Kingwl commentedon Apr 6, 2021
My bad. Thanks!
g-plane commentedon Apr 6, 2021
There's another pull request which may be related to this: #43545 .