0a042a270f
The transformation worked as if there was never an await "to the right" of the body of a let expression (i.e., an expression evaluated after the let expression's body but before the value of the let expression's body is used). This is obviously not right. Fixes https://github.com/dart-lang/sdk/issues/33206 Change-Id: Idc175dc8c65f3d520de8b65f2285164d361ff38e Reviewed-on: https://dart-review.googlesource.com/56492 Commit-Queue: Kevin Millikin <kmillikin@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
37 lines
602 B
Dart
37 lines
602 B
Dart
// 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.
|
|
|
|
import 'dart:async';
|
|
|
|
class X {
|
|
final x;
|
|
final y;
|
|
|
|
X(this.x, this.y);
|
|
|
|
toString() => "X($x, $y)";
|
|
}
|
|
|
|
class Y {
|
|
f(_) {}
|
|
}
|
|
|
|
Future<List<Object>> f1() async {
|
|
return [1];
|
|
}
|
|
|
|
List<Object> f2() => [2];
|
|
|
|
Future<Object> f3() async {
|
|
return 3;
|
|
}
|
|
|
|
Future<X> foo() async {
|
|
return X(Y()..f(await f1())..f(f2()), await f3());
|
|
}
|
|
|
|
Future<void> main() async {
|
|
print(await foo());
|
|
}
|