Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1633)

Unified Diff: tests/language/await_regression_test.dart

Issue 1382123003: Fix await transformation of function calls (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/ast_transformer.cc ('K') | « runtime/vm/ast_transformer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/await_regression_test.dart
diff --git a/tests/language/await_regression_test.dart b/tests/language/await_regression_test.dart
index 9c3e663471b03a8c9b8429650c47741ed91bbe41..90a562dd0a7d57a9b25ee8db91ea9c864b3aecb3 100644
--- a/tests/language/await_regression_test.dart
+++ b/tests/language/await_regression_test.dart
@@ -30,7 +30,19 @@ testNamedArguments() async {
Expect.equals(sum, 0);
}
+testSideEffects() async {
+ Future foo(int a1, int a2) {
+ Expect.equals(10, a1);
+ Expect.equals(11, a2);
+ return new Future.value();
+ }
+ int a = 10;
+ await foo(a++, a++);
+ Expect.equals(12, a);
+}
+
main() async {
testNestedFunctions();
testNamedArguments();
+ testSideEffects();
}
« runtime/vm/ast_transformer.cc ('K') | « runtime/vm/ast_transformer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698