Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 1842363004: More strong mode fixes for analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout options changes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index a586b3b4c65b81504a9b11fd5b968ac45479b4a9..0122c8878cc0123c8f77da1a2c488222a8a19377 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -30,7 +30,8 @@ class DartWorkManager implements WorkManager {
/**
* The list of errors that are reported for raw Dart [Source]s.
*/
- static final List<ResultDescriptor> _SOURCE_ERRORS = <ResultDescriptor>[
+ static final List<ResultDescriptor<List<AnalysisError>>> _SOURCE_ERRORS =
+ <ResultDescriptor<List<AnalysisError>>>[
BUILD_DIRECTIVES_ERRORS,
BUILD_LIBRARY_ERRORS,
PARSE_ERRORS,
@@ -40,7 +41,8 @@ class DartWorkManager implements WorkManager {
/**
* The list of errors that are reported for raw Dart [LibrarySpecificUnit]s.
*/
- static final List<ResultDescriptor> _UNIT_ERRORS = <ResultDescriptor>[
+ static final List<ResultDescriptor<List<AnalysisError>>> _UNIT_ERRORS =
+ <ResultDescriptor<List<AnalysisError>>>[
HINTS,
LINTS,
LIBRARY_UNIT_ERRORS,
@@ -178,12 +180,12 @@ class DartWorkManager implements WorkManager {
}
// If analysis is in progress, combine all known partial results.
List<AnalysisError> errors = <AnalysisError>[];
- for (ResultDescriptor descriptor in _SOURCE_ERRORS) {
+ for (ResultDescriptor<List<AnalysisError>> descriptor in _SOURCE_ERRORS) {
errors.addAll(analysisCache.getValue(source, descriptor));
}
for (Source library in context.getLibrariesContaining(source)) {
LibrarySpecificUnit unit = new LibrarySpecificUnit(library, source);
- for (ResultDescriptor descriptor in _UNIT_ERRORS) {
+ for (ResultDescriptor<List<AnalysisError>> descriptor in _UNIT_ERRORS) {
errors.addAll(analysisCache.getValue(unit, descriptor));
}
}
@@ -304,7 +306,7 @@ class DartWorkManager implements WorkManager {
// Update parts in libraries.
if (isDartLibrarySource) {
Source library = target;
- List<Source> includedParts = outputs[INCLUDED_PARTS];
+ List<Source> includedParts = outputs[INCLUDED_PARTS] as List<Source>;
if (includedParts != null) {
libraryPartsMap[library] = includedParts;
for (Source part in includedParts) {
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698