-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failuresanalyzer-analysis-optionsanalyzer-apiIssues that impact the public API of the analyzer packageIssues that impact the public API of the analyzer packagedevexp-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
TypeSystemImpl was a convenient place to drop in the value of whether "strict casts" has been enabled in an analysis options file, but the treatment of those files is changing (an analysis options file will not be sufficient conditions to create an analysis context), so I think that field needs to move out of TypeSystemImpl. How is it used?
- A few error checkers query
if (typeSystem.strictCasts) .... I think these queries can instead poke at the analysis options file which pertains to the library being analyzed. - Inside TypeSystemImpl, the field is used in exactly one position: the
isAssignableTofunction, in order to disable all downcasts. We could instead makebool strictCastsa parameter on the function. But this function is referenced 59 times (at least?) in the Dart SDK, and they should probably all pass the correct value ofstrictCastsas per some library's analysis options file.
CC @scheglov @keertip @bwilkerson @pq .
Metadata
Metadata
Assignees
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failuresanalyzer-analysis-optionsanalyzer-apiIssues that impact the public API of the analyzer packageIssues that impact the public API of the analyzer packagedevexp-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug