| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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"; | |
| 6 | |
| 7 // Loading a deferred library without prefix is not allowed. | 5 // Loading a deferred library without prefix is not allowed. |
| 8 @lazy import "deferred_constraints_lib2.dart"; /// 01: compile-time error | 6 import "deferred_constraints_lib2.dart" |
| 9 | 7 deferred /// 01: compile-time error |
| 10 const lazy = const DeferredLibrary('lib'); | 8 ; |
| 11 | 9 |
| 12 void main() { | 10 void main() { |
| 13 lazy.load().then((_) { /// 01: continued | |
| 14 C c = new C(); /// 01: continued | |
| 15 print(c); /// 01: continued | |
| 16 }); /// 01: continued | |
| 17 } | 11 } |
| OLD | NEW |