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

Unified Diff: lib/parser.dart

Issue 1826093002: Fix strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/source_maps@master
Patch Set: 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/parser.dart
diff --git a/lib/parser.dart b/lib/parser.dart
index a9fcff57840ec6d4cef109b24770db20c16a9440..c69420c6e2142d3849ca66624b3587c9db79188e 100644
--- a/lib/parser.dart
+++ b/lib/parser.dart
@@ -182,7 +182,7 @@ class SingleMapping extends Mapping {
var names = new LinkedHashMap<String, int>();
var lineNum;
- var targetEntries;
+ List<TargetEntry> targetEntries;
for (var sourceEntry in sourceEntries) {
if (lineNum == null || sourceEntry.target.line > lineNum) {
lineNum = sourceEntry.target.line;
@@ -212,8 +212,8 @@ class SingleMapping extends Mapping {
SingleMapping.fromJson(Map map, {mapUrl})
: targetUrl = map['file'],
- urls = map['sources'],
- names = map['names'],
+ urls = map['sources'] as List<String>,
Siggi Cherem (dart-lang) 2016/03/24 01:15:02 +leafp - would this cause a runtime check failure?
Leaf 2016/03/24 03:23:41 Yep. If map['sources'] returns something with rei
nweiz 2016/03/24 19:07:54 Good catch, done. @leafp: That would also be nice
Siggi Cherem (dart-lang) 2016/03/24 19:36:19 +1 - it would be good to avoid coping.
+ names = map['names'] as List<String>,
sourceRoot = map['sourceRoot'],
lines = <TargetLineEntry>[],
_mapUrl = mapUrl is String ? Uri.parse(mapUrl) : mapUrl {
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698