| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
| 7 | 7 |
| 8 typedef Future<Null> Task(); | 8 typedef Future<Null> Task(); |
| 9 | 9 |
| 10 class ForeignFuture implements Future<Null> { | 10 class ForeignFuture implements Future<Null> { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 await new ForeignFuture([hello]); | 63 await new ForeignFuture([hello]); |
| 64 } catch (e) {} | 64 } catch (e) {} |
| 65 return 'world'; | 65 return 'world'; |
| 66 } | 66 } |
| 67 | 67 |
| 68 Future main() async { | 68 Future main() async { |
| 69 var r2 = await world(); | 69 var r2 = await world(); |
| 70 Expect.equals('hello', r1); | 70 Expect.equals('hello', r1); |
| 71 Expect.equals('world', r2); | 71 Expect.equals('world', r2); |
| 72 } | 72 } |
| OLD | NEW |