Index: pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
index c60f8ba6ca024cde45bbd0993ba8746a38de4248..23645da1d89ae9620ec7da0ab37b2d135aaa4d67 100644 |
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
@@ -174,6 +174,23 @@ abstract class ResynthesizerResultProvider extends ResultProvider { |
return true; |
} |
AnalysisTarget target = entry.target; |
+ |
+ // LINE_INFO can be provided using just the UnlinkedUnit. |
+ if (target is Source && result == LINE_INFO) { |
+ String uriString = target.uri.toString(); |
+ UnlinkedUnit unlinkedUnit = _dataStore.unlinkedMap[uriString]; |
+ if (unlinkedUnit != null) { |
+ List<int> lineStarts = unlinkedUnit.lineStarts; |
+ if (lineStarts.isNotEmpty) { |
+ LineInfo lineInfo = new LineInfo(lineStarts); |
+ entry.setValue(result as ResultDescriptor<LineInfo>, lineInfo, |
+ TargetedResult.EMPTY_LIST); |
+ return true; |
+ } |
+ } |
+ return false; |
+ } |
+ |
// Check whether there are results for the source. |
if (!hasResultsForSource(target.librarySource ?? target.source)) { |
return false; |
@@ -239,16 +256,6 @@ abstract class ResynthesizerResultProvider extends ResultProvider { |
return true; |
} |
return false; |
- } else if (result == LINE_INFO) { |
- UnlinkedUnit unlinkedUnit = _dataStore.unlinkedMap[uriString]; |
- List<int> lineStarts = unlinkedUnit.lineStarts; |
- if (lineStarts.isNotEmpty) { |
- LineInfo lineInfo = new LineInfo(lineStarts); |
- entry.setValue(result as ResultDescriptor<LineInfo>, lineInfo, |
- TargetedResult.EMPTY_LIST); |
- return true; |
- } |
- return false; |
} |
} else if (target is LibrarySpecificUnit) { |
if (result == CREATED_RESOLVED_UNIT1 || |