| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
analyzer: Mark types specified in type arguments and variable declarations as "used"
Fixes https://github.com/dart-lang/sdk/issues/60510
The rules of when a NamedType was considered a "usage" of a type were
getting too complex and silly to be coherent. I had previously been
attempting to carve out the places where it seemed like a private type
couldn't be used unless it was instantiated. But then `@JS`-annotated
objects were an exception, and now classes that extend `NativeType` are
an exception, if used in a type argument.
But those exceptions are not simple, because the type usage could
come from inference, and so the NamedType might appear in a variety of
places.
This changes simplifies the notion of whether a NamedType constitutes
a usage. We keep only the "inside an is-expression" exception. This
can be seen in the test changes: NamedType in variable declaration now counts as usage.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |