Skip to content

noImplicitOverride complains about static property not overriding non-static property #43563

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

Closed
mjbvz opened this issue Apr 7, 2021 · 1 comment · Fixed by #43569
Closed
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Apr 7, 2021

Bug Report

🔎 Search Terms

  • noImplicitOverride
  • static

🕗 Version & Regression Information

4.3.0-dev.20210406

💻 Code

Using --noImplicitOverride:

export class Foo {
    kind = 1
}

class SubFoo extends Foo {
    static kind = '123';
}

🙁 Actual behavior

On static kind = 123, I see:

This member must have an 'override' modifier because it overrides a member in the base class 'Foo'.

🙂 Expected behavior

I don't think this should be an issue. SubFoo.kind is distinct from the Foo.kind instance property

@Kingwl
Copy link
Contributor

Kingwl commented Apr 7, 2021

Thanks! I'll take a look soon

@andrewbranch andrewbranch added this to the TypeScript 4.3.1 milestone Apr 7, 2021
@andrewbranch andrewbranch added the Bug A bug in TypeScript label Apr 7, 2021
@typescript-bot typescript-bot added the Fix Available A PR has been opened for this issue label Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants