617e05ee49
Change-Id: If452f1bf1e36c3dcf5947beff6ff07be01674217 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194202 Commit-Queue: Joshua Litt <joshualitt@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
48 lines
1.3 KiB
Dart
48 lines
1.3 KiB
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.
|
|
|
|
/*spec.library:
|
|
a_pre_fragments=[
|
|
p1: {units: [2{lib1}], usedBy: [], needs: []},
|
|
p2: {units: [3{lib2}], usedBy: [], needs: []},
|
|
p3: {units: [1{lib1, lib2}], usedBy: [], needs: []}],
|
|
b_finalized_fragments=[
|
|
f1: [2{lib1}],
|
|
f2: [3{lib2}],
|
|
f3: [1{lib1, lib2}]],
|
|
c_steps=[
|
|
lib1=(f3, f1),
|
|
lib2=(f3, f2)]
|
|
*/
|
|
|
|
/*two-frag|three-frag.library:
|
|
a_pre_fragments=[
|
|
p1: {units: [2{lib1}], usedBy: [p3], needs: []},
|
|
p2: {units: [3{lib2}], usedBy: [p3], needs: []},
|
|
p3: {units: [1{lib1, lib2}], usedBy: [], needs: [p1, p2]}],
|
|
b_finalized_fragments=[
|
|
f1: [2{lib1}],
|
|
f2: [3{lib2}],
|
|
f3: [1{lib1, lib2}]],
|
|
c_steps=[
|
|
lib1=(f3, f1),
|
|
lib2=(f3, f2)]
|
|
*/
|
|
|
|
// @dart = 2.7
|
|
|
|
import 'lib1.dart' deferred as lib1;
|
|
import 'lib2.dart' deferred as lib2;
|
|
|
|
// lib1.C1 and lib2.C2 has a shared base class. It will go in its own hunk.
|
|
/*member: main:member_unit=main{}*/
|
|
void main() {
|
|
lib1.loadLibrary().then(/*closure_unit=main{}*/ (_) {
|
|
print(new lib1.C1());
|
|
lib2.loadLibrary().then(/*closure_unit=main{}*/ (_) {
|
|
print(new lib2.C2());
|
|
});
|
|
});
|
|
}
|