// 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. // @dart=2.9 // The test checks that an expression with static type Future is // accepted as a return expression of a method with an async body and the // declared return type Future. import 'dart:async'; class A { dynamic foo() => null; } class B { A a; Future bar() async => a.foo(); } class C { B b = B(); Future baz() async => b.bar(); } main() {}