-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Analyzer: static warning support for extension types #53434
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
Labels
devexp-pkg-meta
Issues related to package:meta
devexp-warning
Issues with the analyzer's Warning codes
legacy-area-analyzer
Use area-devexp instead.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Comments
Happy to take a look at (some bits of) this. Some annotation support will get ungated by #53368 |
copybara-service bot
pushed a commit
that referenced
this issue
Sep 7, 2023
See: #53434 Change-Id: Ibeab460fa8cc9d7e7fa0efdb062c839659243e45 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324574 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 7, 2023
validation/tests for application of * `@mustCallSuper` * `@nonVirtual` * `@reopen` * `@sealed` to extension types See: #53434 Change-Id: I005523507044e7d5879a5589c132384e7bb8be56 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324768 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 11, 2023
See: #53434 Change-Id: I931a7cdff990ca19f6ec3267340031ca5fa7b814 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325322 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 12, 2023
See: #53434 Change-Id: I2668b74e2037176d0ac6e6da22300be29ba14d8d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325444 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 13, 2023
See: #53434 Change-Id: I4bd62ec9c4791e9046e285c782bb6e9adfced9eb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325900 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 13, 2023
See: #53434 Change-Id: Ie5e8398dd8c0378c3fd9a5571f3fdabdbc36a194 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325962 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 14, 2023
See: #53434 Change-Id: I0cca5b38fc6e432a8eb5e1ab3381625203063cab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326180 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
copybara-service bot
pushed a commit
that referenced
this issue
Sep 19, 2023
See: #53434 Change-Id: I3a94046dff920a05fd6e617c6f234c001fab6781 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326880 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
19 tasks
copybara-service bot
pushed a commit
that referenced
this issue
Oct 19, 2023
See: #53434 Change-Id: Ifb0e87f8b2fb080555f1c5fdbd553e9a16d0a467 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331202 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
Any updates, @pq? Is this still P1? |
I haven't looked at the remaining open line items in a bit but my sense is they are not |
Closing as more-or-less complete. The remaining work is not worth tracking. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
devexp-pkg-meta
Issues related to package:meta
devexp-warning
Issues with the analyzer's Warning codes
legacy-area-analyzer
Use area-devexp instead.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
warnings based on meta annotations:
@experimental
,@internal
,@protected
,@visibleForTesting
- does it work on a method declared in an extension type? does it work on a method "implemented" (exposed) via an extension type? If an extension type itself is annotated with any of these, does enforcement work when referencing the extension type? Does enforcement work when referencing/calling the primary constructor?@experimental
(@pq)@internal
(@pq)@protected
(@pq)@visibleForTesting
(@pq)@factory
(@pq)@immutable
(@pq)@literal
- (@pq)@mustBeOverridden
- should be disallowed on methods declared in extension types (and extensions if not already) (@pq)@mustCallSuper
- should be disallowed on methods declared in extension types (and extensions if not already) (@pq)@nonVirtual
- should be disallowed on methods declared in extension types (and extensions if not already) (@pq)@optionalTypeArgs
- can annotate a type extension (@pq 8a5ddec)@reopen
- cannot annotate a type extension (or an extension, if not already banned) (@pq)@sealed
- cannot annotate a type extension (or an extension, if not already banned) (@pq)@visibleForOverriding
- cannot annotate a type extension or extension type member (@pq)other warnings:
DEPRECATED_MEMBER_USE
- test against extension type, member declared in extension type, member "implemented" (exposed) by extension typeDIVISION_OPTIMIZATION
- what if x or y are an extension type on int?INFERENCE_FAILURE_ON_*
- I think tests are needed both for expressions passed to extension type constructor, and extension typed expressions passed elsewhereOVERRIDE_ON_NON_OVERRIDING_*
- for anything declared in an extension typeRETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR
andRETURN_TYPE_INVALID_FOR_CATCH_ERROR
- return type being an extension type on Future should be ok.STRICT_RAW_TYPE
- should be reported for an extension type missing type arguments. (@pq)UNNECESSARY_TYPE_CHECK
(@pq)UNUSED_ELEMENT
- [Extension Types] analyzer should produceUNUSED_ELEMENT
diagnostics for unused extension type decls #53520 (@pq)The text was updated successfully, but these errors were encountered: