OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 // Test that await after deferred loading works as expected. |
| 6 |
| 7 import 'dart:async'; |
| 8 import "package:expect/expect.dart"; |
| 9 import 'deferred_regression_28678_lib.dart' deferred as lib; |
| 10 |
| 11 class A { |
| 12 m() => "here"; |
| 13 } |
| 14 |
| 15 f(a, b) => new Future.microtask(() {}); |
| 16 |
| 17 class R { |
| 18 Future test_deferred() async { |
| 19 var a = new A(); |
| 20 await lib.loadLibrary(); |
| 21 await f(lib.Clazz, lib.v); |
| 22 Expect.equals("here", a.m()); |
| 23 } |
| 24 } |
| 25 |
| 26 main() async { |
| 27 await new R().test_deferred(); |
| 28 } |
OLD | NEW |