Closed
Listed in
Description
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?@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)@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)
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
pq commentedon Sep 6, 2023
Happy to take a look at (some bits of) this.
Some annotation support will get ungated by #53368
validate `@mustBeOverridden` on extension type methods
annotation validation for extension types
validate `@visibleForOverriding` extension type targets
`@literal` support for extension types
validate `@protected` extension type members
validate `@internal` extension type member uses
`@visibleForTesting` validation for extension type members
STRICT_RAW_TYPE tests for extension types
`@factory` validation for extension types
srawlins commentedon Feb 27, 2024
Any updates, @pq? Is this still P1?
pq commentedon Feb 27, 2024
I haven't looked at the remaining open line items in a bit but my sense is they are not
P1
.srawlins commentedon Aug 2, 2024
Closing as more-or-less complete. The remaining work is not worth tracking.