Chromium Code Reviews| Index: lib/src/version_constraint.dart |
| diff --git a/lib/src/version_constraint.dart b/lib/src/version_constraint.dart |
| index 68827a40c4c9084336df94f3cc7bac4f973a1678..147a732d530b3629876fb1d94b9cb6033d76414a 100644 |
| --- a/lib/src/version_constraint.dart |
| +++ b/lib/src/version_constraint.dart |
| @@ -236,6 +236,10 @@ abstract class VersionConstraint { |
| /// Creates a new [VersionConstraint] that allows [Versions]s allowed by |
| /// either this or [other]. |
| VersionConstraint union(VersionConstraint other); |
| + |
| + /// Creates a new [VersionConstraint] that allows [Version]s allowed by this |
|
Bob Nystrom
2016/06/08 22:51:06
Technically, these don't always create *new* const
nweiz
2016/06/08 23:39:02
Done.
|
| + /// but not [other]. |
| + VersionConstraint difference(VersionConstraint other); |
| } |
| class _EmptyVersion implements VersionConstraint { |
| @@ -248,6 +252,7 @@ class _EmptyVersion implements VersionConstraint { |
| bool allowsAny(VersionConstraint other) => false; |
| VersionConstraint intersect(VersionConstraint other) => this; |
| VersionConstraint union(VersionConstraint other) => other; |
| + VersionConstraint difference(VersionConstraint other) => this; |
| String toString() => '<empty>'; |
| } |