eae0dda31e
Change-Id: I3a1526645a385e2ab75240841cd8def58712e792 Reviewed-on: https://dart-review.googlesource.com/31741 Reviewed-by: Emily Fortuna <efortuna@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
22 lines
561 B
Dart
22 lines
561 B
Dart
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// Test that loading of a library (with top-level functions only) can
|
|
// be deferred.
|
|
|
|
import '../libs/deferred_function_lib.dart' deferred as lib;
|
|
|
|
/*element: readFoo:OutputUnit(main, {})*/
|
|
readFoo() {
|
|
return lib.foo;
|
|
}
|
|
|
|
/*element: main:OutputUnit(main, {})*/
|
|
main() {
|
|
lib.loadLibrary().then((_) {
|
|
lib.foo('b');
|
|
readFoo();
|
|
});
|
|
}
|