30ac6d116d
import "lib.dart" deferred as lib; And then injecting a function of the name "loadLibrary" into the namespace of the import prefix. This FunctionElement is a triggers the builder to emit special code that causes _loadLibraryWrapper in js_helper to be called. Dart2dart will not crash on deferred loading, but calls to loadLibrary will become calls to a (not-existing) top-level function loadLibrary. The old syntax (using metadata) is still working For now keeping the language tests with the old syntax in addition to the updated tests. R=floitsch@google.com, johnniwinther@google.com Review URL: https://codereview.chromium.org//201613006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34230 260f80e4-7a28-3924-810f-c04153c831b5
8 lines
192 B
Dart
8 lines
192 B
Dart
import "deferred_load_library_wrong_args_lib.dart" deferred as lib;
|
|
|
|
void main() {
|
|
// Loadlibrary should be called without arguments.
|
|
lib.loadLibrary(
|
|
10 /// 01: runtime error
|
|
);
|
|
} |