Eliminate uses of fuzzy arrows in pkg/testing (fix bots).

The analyzer now issues hints on uses of the deprecated behavior in
which dynamic is treated as bottom in certain positions.  These
changes eliminate cases from pkg/testing that were relying on the
deprecated behavior.

TBR=ahe@google.com

BUG=

Review-Url: https://codereview.chromium.org/3010803002 .
This commit is contained in:
Leaf Petersen 2017-08-30 16:24:51 -07:00
parent 9bc8e5932a
commit 3124001cc7
3 changed files with 7 additions and 3 deletions

View file

@ -181,7 +181,8 @@ abstract class ChainContext {
} else {
future = new Future.value(null);
}
future = future.then((Result currentResult) {
future = future.then((_currentResult) {
Result currentResult = _currentResult;
if (currentResult != null) {
logStepComplete(completed, unexpectedResults.length,
descriptions.length, suite, description, lastStepRun);

View file

@ -89,7 +89,9 @@ class ExpectationSet {
for (Map map in data) {
String name;
String group;
map.forEach((String key, String value) {
map.forEach((_key, _value) {
String key = _key;
String value = _value;
switch (key) {
case "name":
name = value;

View file

@ -48,7 +48,8 @@ Future runGuarded(Future f(),
ZoneSpecification specification = new ZoneSpecification(print: printWrapper);
ReceivePort errorPort = new ReceivePort();
Future errorFuture = errorPort.listen((List errors) {
Future errorFuture = errorPort.listen((_errors) {
List errors = _errors;
Isolate.current.removeErrorListener(errorPort.sendPort);
errorPort.close();
var error = errors[0];