Skip to content

ignore static and declared member if checking override #43569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 9, 2021

Conversation

Kingwl
Copy link
Contributor

@Kingwl Kingwl commented Apr 7, 2021

Fixes #43563
Fixes #43566

Declared property does not really override. So just ignore that.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Apr 7, 2021
@Kingwl Kingwl changed the title ignore static member if checking override ignore static and declared member if checking override Apr 7, 2021
@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 7, 2021
@andrewbranch
Copy link
Member

I think I would expect that under --noImplicitOverride, overriding a static property with another static property would require the override keyword. The issue with #43563 is that it didn’t seem to recognize that static and instance properties are distinct at all. But maybe I’m missing something?

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in the design meeting and decided that yes, static overrides need the override keyword in --noImplicitOverride.

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Kingwl!

@andrewbranch andrewbranch merged commit b0c2860 into microsoft:master Apr 9, 2021
@Kingwl Kingwl deleted the fix_override_issues branch May 6, 2021 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
4 participants