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

Unified Diff: utils/pub/version.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « utils/pub/source.dart ('k') | utils/pub/yaml/model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/version.dart
===================================================================
--- utils/pub/version.dart (revision 13683)
+++ utils/pub/version.dart (working copy)
@@ -41,7 +41,7 @@
final String build;
/** Creates a new [Version] object. */
- Version(this.major, this.minor, this.patch, [String pre, this.build])
+ Version(this.major, this.minor, this.patch, {String pre, this.build})
: preRelease = pre {
if (major < 0) throw new ArgumentError(
'Major version must be non-negative.');
@@ -68,7 +68,7 @@
String preRelease = match[5];
String build = match[8];
- return new Version(major, minor, patch, preRelease, build);
+ return new Version(major, minor, patch, pre: preRelease, build: build);
} on FormatException catch (ex) {
throw new FormatException('Could not parse "$text".');
}
@@ -257,8 +257,8 @@
final bool includeMin;
final bool includeMax;
- VersionRange([this.min, this.max,
- this.includeMin = false, this.includeMax = false]) {
+ VersionRange({this.min, this.max,
+ this.includeMin: false, this.includeMax: false}) {
if (min != null && max != null && min > max) {
throw new ArgumentError(
'Minimum version ("$min") must be less than maximum ("$max").');
@@ -339,8 +339,8 @@
}
// If we got here, there is an actual range.
- return new VersionRange(intersectMin, intersectMax,
- intersectIncludeMin, intersectIncludeMax);
+ return new VersionRange(min: intersectMin, max: intersectMax,
+ includeMin: intersectIncludeMin, includeMax: intersectIncludeMax);
}
throw new ArgumentError(
« no previous file with comments | « utils/pub/source.dart ('k') | utils/pub/yaml/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698