-
Notifications
You must be signed in to change notification settings - Fork 12.9k
--noImplicitOverride #39669
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
DanielRosenwasser
merged 76 commits into
microsoft:master
from
Kingwl:exprement-override
Mar 26, 2021
Merged
--noImplicitOverride #39669
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
8b90b8d
wip: add types
Kingwl ea5608a
wip
Kingwl 9371d87
Add cases
Kingwl 6cb7f5e
Add some case
Kingwl 061cd27
Add more check
Kingwl 37ada55
accept baseline
Kingwl 6401e1a
add abstract abd declare method
Kingwl be00363
add override in declaration
Kingwl fbb6e28
accept baseline
Kingwl 6014a3a
add property override
Kingwl a65df91
Fix decalre modifier
Kingwl 43d9f70
update baseline
Kingwl e73c941
Add more cases
Kingwl c0edf6f
make lint happy
Kingwl dca93ac
make lint happy
Kingwl 2fd560a
Update description
Kingwl 94187c7
Add codefix
Kingwl 2b57fbd
simplify code
Kingwl 3a2286b
Merge branch 'master' into exprement-override
Kingwl d34afb9
accept baseline
Kingwl b4614d1
Update desc
Kingwl 1ef034d
Accept baseline
Kingwl aebfb28
Add override completions
Kingwl 7753983
filter out implements field in override context
Kingwl 5c04ccc
fix tests
Kingwl add16c9
Add parameter property check
Kingwl 5316e2f
Accept baseline
Kingwl f36fede
acept baseline
Kingwl 811bd1e
Add parameter property to declaration code action
Kingwl d0f5095
Add quickfix for override parameter property
Kingwl dd51815
Merge branch 'master' into exprement-override
Kingwl 22bb09d
fix code style
Kingwl eee3b77
Add override with interface tests
Kingwl f94e93c
Add more cases about modifier position
Kingwl 74f14c3
Merge branch 'master' into exprement-override
Kingwl e35ee17
rename flag
Kingwl d8fda5f
rename flags
Kingwl 18434fd
Added tests.
DanielRosenwasser 5ab5a7f
Accepted baselines.
DanielRosenwasser f52822a
Always issue errors for unnecessary 'override' modifiers.
DanielRosenwasser 48c23a5
Accepted baselines.
DanielRosenwasser a3f0443
Merge branch 'master' into exprement-override
Kingwl cdd0739
Override perf (#4)
Kingwl 8e53ad3
Merge branch 'master' into exprement-override
Kingwl 827bc95
Do not issue error if implement abstract
Kingwl 618f883
Add abstract-spec check
Kingwl bc4d758
Avoid override dead lock
Kingwl 47296d6
Add more case
Kingwl 5d19a90
Add codefix for new error
Kingwl 68e1440
Fix error message
Kingwl 82109e9
Merge branch 'master' into exprement-override
Kingwl 2552495
Add jsdoc override tag (#6)
Kingwl cf5dc7e
Override jsdoc tag (#7)
Kingwl b65d244
Disallow codefix in js
Kingwl 84cc69d
Merge branch 'master' into exprement-override
Kingwl 6d89a7a
update baseline
Kingwl 062f149
update baseline
Kingwl feb9093
Omit override in d.ts
Kingwl 0c09a2e
Add more case in js
Kingwl 3cf3c28
Accept baseline
Kingwl d874ae8
fix override js test
Kingwl e361ddc
Merge branch 'master' into exprement-override
Kingwl 40da344
Merge branch 'master' into exprement-override
Kingwl f9384bc
fix crlf
Kingwl eea8259
Revert merge conflict changes
Kingwl ff3cbc1
Accept baseline
Kingwl a3766d2
Avoid space
Kingwl e2c245e
Merge branch 'master' into exprement-override
Kingwl 8f3dcb9
Merge branch 'master' into exprement-override
Kingwl 1db64fb
Fix CR issues
Kingwl 71c00d5
Merge branch 'master' into exprement-override
Kingwl e3c0993
Accept baseline
Kingwl 89517a0
Fix typo and add more check
Kingwl 6c8d00d
Fix error name
Kingwl bbfb7eb
Merge branch 'master' into exprement-override
Kingwl 4575b5a
Merge branch 'master' into exprement-override
Kingwl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add more check
- Loading branch information
commit 061cd27da6dadcaaed23ffaab38bae20a343808c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,71 @@ | ||
tests/cases/conformance/override/override1.ts(15,5): suggestion TS6385: 'need override' is deprecated | ||
tests/cases/conformance/override/override1.ts(19,14): suggestion TS6385: 'not founded in base class' is deprecated | ||
tests/cases/conformance/override/override1.ts(25,14): suggestion TS6385: 'has override but not extended' is deprecated | ||
tests/cases/conformance/override/override1.ts(9,5): error TS4113: Method must have override modifier because it's override the base class 'B'. | ||
tests/cases/conformance/override/override1.ts(11,14): error TS4112: Method cannot have override modifier because it's not existed in the base class 'B'. | ||
tests/cases/conformance/override/override1.ts(15,14): error TS4111: Method cannot have override modifier because class 'C' does not extended another class. | ||
tests/cases/conformance/override/override1.ts(22,9): error TS4113: Method must have override modifier because it's override the base class 'B'. | ||
tests/cases/conformance/override/override1.ts(24,18): error TS4112: Method cannot have override modifier because it's not existed in the base class 'B'. | ||
tests/cases/conformance/override/override1.ts(33,5): error TS4113: Method must have override modifier because it's override the base class '(Anonymous class)'. | ||
tests/cases/conformance/override/override1.ts(37,14): error TS4112: Method cannot have override modifier because it's not existed in the base class '(Anonymous class)'. | ||
tests/cases/conformance/override/override1.ts(42,18): error TS4111: Method cannot have override modifier because class '(Anonymous class)' does not extended another class. | ||
|
||
|
||
==== tests/cases/conformance/override/override1.ts (3 errors) ==== | ||
==== tests/cases/conformance/override/override1.ts (8 errors) ==== | ||
class B { | ||
foo (v: string) { | ||
|
||
} | ||
fooo (v: string) { | ||
|
||
} | ||
foo (v: string) {} | ||
fooo (v: string) {} | ||
} | ||
|
||
class D extends B { | ||
override foo (v: string) { | ||
override foo (v: string) {} | ||
|
||
} | ||
|
||
fooo (v: string) { | ||
fooo (v: string) {} | ||
~~~~ | ||
!!! suggestion TS6385: 'need override' is deprecated | ||
|
||
} | ||
!!! error TS4113: Method must have override modifier because it's override the base class 'B'. | ||
|
||
override bar(v: string) { | ||
override bar(v: string) {} | ||
~~~ | ||
!!! suggestion TS6385: 'not founded in base class' is deprecated | ||
|
||
} | ||
!!! error TS4112: Method cannot have override modifier because it's not existed in the base class 'B'. | ||
} | ||
|
||
class C { | ||
override foo(v: string) { | ||
override foo(v: string) {} | ||
~~~ | ||
!!! suggestion TS6385: 'has override but not extended' is deprecated | ||
!!! error TS4111: Method cannot have override modifier because class 'C' does not extended another class. | ||
} | ||
|
||
function f () { | ||
return class extends B { | ||
override foo (v: string) {} | ||
|
||
fooo (v: string) {} | ||
~~~~ | ||
!!! err 10000 or TS4113: Method must have override modifier because it's override the base class 'B'. | ||
|
||
override bar(v: string) {} | ||
~~~ | ||
!!! error TS4112: Method cannot have override modifier because it's not existed in the base class 'B'. | ||
} | ||
} | ||
|
||
class E extends (class { | ||
foo () { } | ||
bar () { } | ||
}) { | ||
override foo () { } | ||
bar () { } | ||
~~~ | ||
!!! error TS4113: Method must have override modifier because it's override the base class '(Anonymous class)'. | ||
|
||
baz() {} | ||
|
||
override bazz () {} | ||
~~~~ | ||
!!! error TS4112: Method cannot have override modifier because it's not existed in the base class '(Anonymous class)'. | ||
} | ||
|
||
function ff () { | ||
return class { | ||
override foo () {} | ||
~~~ | ||
!!! error TS4111: Method cannot have override modifier because class '(Anonymous class)' does not extended another class. | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.