blob: ae5b75160b868fc051745868b1c11358f9d53472 [file] [log] [blame]
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class Foo<T> {
final Future<dynamic> Function() quux;
T t;
Foo(this.quux, this.t);
Future<T> call() => quux().then<T>((_) => t);
}
class Bar {
Foo<Baz> qux;
Future<void> quuz() =>
qux().then((baz) => corge(baz)).then((grault) => garply(grault));
Grault corge(Baz baz) => null;
void garply(Grault grault) {}
}
class Baz {}
class Grault {}
main() {}