OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Regression test for http://dartbug.com/22868/ | 5 // Regression test for http://dartbug.com/22868/ and http://dartbug.com/22895/. |
6 // Ensure that the closure tracer properly handles await. | 6 // Ensure that the closure tracer properly handles await. |
7 | 7 |
8 main() async { | 8 main() async { |
9 var closures = [(x, y) => x + y]; | 9 var closures = [(x, y) => x + y]; |
10 print(((await closures)[0])(4, 2)); | 10 print(((await closures)[0])(4, 2)); |
11 } | 11 } |
12 | |
OLD | NEW |