mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
[dart2js] Fix minor bug in regenerating annotations.
Change-Id: Ia6b5a2cef3815b000f5a88f5560ca0782fb7b53c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206561 Auto-Submit: Joshua Litt <joshualitt@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
624ccd30f8
commit
727207910b
|
@ -17,7 +17,7 @@ export 'package:front_end/src/testing/id_extractor.dart';
|
|||
|
||||
SourceSpan computeSourceSpanFromUriOffset(Uri uri, int offset) {
|
||||
if (uri != null) {
|
||||
if (offset != null) {
|
||||
if (offset != null && offset != -1) {
|
||||
return new SourceSpan(uri, offset, offset + 1);
|
||||
} else {
|
||||
return new SourceSpan(uri, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue