Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: tests/language/deferred_no_prefix_test.dart

Issue 201613006: Introduces the new syntax for deferred loading (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ambigous elements are not top-level. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"; 5 import "dart:async";
6 6
7 // Loading a deferred library without prefix is not allowed. 7 // Loading a deferred library without prefix is not allowed.
8 @lazy import "deferred_constraints_lib2.dart"; /// 01: compile-time error 8 import "deferred_constraints_lib2.dart" deferred; /// 01: compile-time error
floitsch 2014/03/19 21:04:51 make error-area smaller import "deferred_constrai
sigurdm 2014/03/20 12:26:33 Done.
9 9
10 const lazy = const DeferredLibrary('lib'); 10 const lazy = const DeferredLibrary('lib');
11 11
12 void main() { 12 void main() {
13 lazy.load().then((_) { /// 01: continued 13 lazy.load().then((_) { /// 01: continued
floitsch 2014/03/19 21:04:51 Remove these lines.
sigurdm 2014/03/20 12:26:33 Done.
14 C c = new C(); /// 01: continued 14 C c = new C(); /// 01: continued
15 print(c); /// 01: continued 15 print(c); /// 01: continued
16 }); /// 01: continued 16 }); /// 01: continued
17 } 17 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698