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

Unified Diff: lib/src/version_union.dart

Issue 1417163006: Fix three strong mode analysis issues. (Closed) Base URL: https://github.com/dart-lang/pub_semver.git@master
Patch Set: v.1.2.3 Created 5 years, 2 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 | « lib/src/version_constraint.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/version_union.dart
diff --git a/lib/src/version_union.dart b/lib/src/version_union.dart
index ee9f657acf6d3a7b71e1f8cfa72f3b7cf3baa025..a6715145a84223dbd839ad04ee6c4f73f430b0d5 100644
--- a/lib/src/version_union.dart
+++ b/lib/src/version_union.dart
@@ -59,7 +59,7 @@ class VersionUnion implements VersionConstraint {
(flattened as List).sort(compareMax);
- var merged = [];
+ var merged = <VersionRange>[];
for (var constraint in flattened) {
// Merge this constraint with the previous one, but only if they touch.
if (merged.isEmpty ||
@@ -132,7 +132,7 @@ class VersionUnion implements VersionConstraint {
// Because both lists of constraints are ordered by minimum version, we can
// safely move through them linearly here.
- var newConstraints = [];
+ var newConstraints = <VersionRange>[];
ourConstraints.moveNext();
theirConstraints.moveNext();
while (ourConstraints.current != null && theirConstraints.current != null) {
« no previous file with comments | « lib/src/version_constraint.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698