| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 // |
| 5 // VMOptions=--enable_async |
| 6 // |
| 7 // Regression test for issue 21536. |
| 8 |
| 9 import 'dart:async'; |
| 10 import 'package:expect/expect.dart'; |
| 11 |
| 12 later(vodka) => new Future.value(vodka); |
| 13 |
| 14 manana(tequila) async => tequila; |
| 15 |
| 16 main() async { |
| 17 var a = await later('Asterix').then((tonic) { |
| 18 return later(tonic); |
| 19 }); |
| 20 var o = await manana('Obelix').then(manana); |
| 21 Expect.equals("$a and $o", "Asterix and Obelix"); |
| 22 } |
| OLD | NEW |