dart-sdk/tests/language/deferred_no_prefix_test.dart
sigurdm@google.com 30ac6d116d Introduces the new syntax for deferred loading
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
2014-03-21 07:50:08 +00:00

12 lines
375 B
Dart

// Copyright (c) 2014, 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.
// Loading a deferred library without prefix is not allowed.
import "deferred_constraints_lib2.dart"
deferred /// 01: compile-time error
;
void main() {
}