Skip to content

Commit

Permalink
Update Process.exitCode setter to not use @OverRide (flutter#7434)
Browse files Browse the repository at this point in the history
As of Dart SDK 1.22.0-dev.5.0, `Process.exitCode` is no longer
mutable (that SDK version picks up dart-lang/sdk@e5a16b1).
This change allows the tools code to pass analysis in sdk versions both
before and after that change, to allow for analysis against both the host and
target sdks.
  • Loading branch information
tvolkert authored Jan 11, 2017
1 parent 2ee04c9 commit a0666f3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/flutter_tools/lib/src/base/process_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,10 @@ class _RecordingProcess implements Process {
@override
Future<int> get exitCode => delegate.exitCode;

@override
set exitCode(Future<int> exitCode) => delegate.exitCode = exitCode;
// TODO(tvolkert): Remove this once the dart sdk in both the target and
// the host have picked up dart-lang/sdk@e5a16b1
@override // ignore: OVERRIDE_ON_NON_OVERRIDING_SETTER
set exitCode(Future<int> exitCode) => throw new UnsupportedError('set exitCode');

@override
Stream<List<int>> get stdout {
Expand Down Expand Up @@ -827,7 +829,9 @@ class _ReplayProcess implements Process {
@override
Future<int> get exitCode => _exitCodeCompleter.future;

@override
// TODO(tvolkert): Remove this once the dart sdk in both the target and
// the host have picked up dart-lang/sdk@e5a16b1
@override // ignore: OVERRIDE_ON_NON_OVERRIDING_SETTER
set exitCode(Future<int> exitCode) => throw new UnsupportedError('set exitCode');

@override
Expand Down

0 comments on commit a0666f3

Please sign in to comment.