mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
Fix summary2 linking when using API summaries, which don't include line starts.
R=brianwilkerson@google.com, paulberry@google.com Change-Id: Iee403b154e4ca546ee69ae7cf0a8764d48ac7d34 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103081 Reviewed-by: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
59bcb38db7
commit
59381cd8d0
|
@ -92,7 +92,12 @@ class LinkedUnitContext {
|
|||
CompilationUnit get unit_withDeclarations {
|
||||
if (_unit == null) {
|
||||
_unit = _astReader.readNode(data.node);
|
||||
_unit.lineInfo = LineInfo(data.lineStarts);
|
||||
|
||||
var lineStarts = data.lineStarts;
|
||||
if (lineStarts.isEmpty) {
|
||||
lineStarts = [0];
|
||||
}
|
||||
_unit.lineInfo = LineInfo(lineStarts);
|
||||
}
|
||||
return _unit;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue