Index: lib/src/solver/backtracking_solver.dart |
diff --git a/lib/src/solver/backtracking_solver.dart b/lib/src/solver/backtracking_solver.dart |
index f487dd66f7c9c942501782827d59a3e25852b05b..da0dbec45e753b96f45bd675c69a78a2d08f46df 100644 |
--- a/lib/src/solver/backtracking_solver.dart |
+++ b/lib/src/solver/backtracking_solver.dart |
@@ -642,17 +642,18 @@ class BacktrackingSolver { |
// Indent for the previous selections. |
log.solver(prefixLines(message, prefix: '| ' * _versions.length)); |
} |
-} |
-/// Ensures that if [pubspec] has an SDK constraint, then it is compatible |
-/// with the current SDK. |
-/// |
-/// Throws a [SolveFailure] if not. |
-void _validateSdkConstraint(Pubspec pubspec) { |
- if (pubspec.environment.sdkVersion.allows(sdk.version)) return; |
- |
- throw new BadSdkVersionException(pubspec.name, |
- 'Package ${pubspec.name} requires SDK version ' |
- '${pubspec.environment.sdkVersion} but the current SDK is ' |
- '${sdk.version}.'); |
+ /// Ensures that if [pubspec] has an SDK constraint, then it is compatible |
+ /// with the current SDK. |
+ /// |
+ /// Throws a [SolveFailure] if not. |
+ void _validateSdkConstraint(Pubspec pubspec) { |
+ if (_overrides.containsKey(pubspec.name)) return; |
+ if (pubspec.environment.sdkVersion.allows(sdk.version)) return; |
+ |
+ throw new BadSdkVersionException(pubspec.name, |
+ 'Package ${pubspec.name} requires SDK version ' |
+ '${pubspec.environment.sdkVersion} but the current SDK is ' |
+ '${sdk.version}.'); |
+ } |
} |