Files
sdk/tests/compiler/dart2js/deferred_loading/data/shared_constant.dart
T
Sigmund Cherem 747772b02d Add regression test for #31306
I ended up fixing this bug during my refactoring to support
deferred-constant-values in kernel (1ddb7db237).
The issue was that ssa/builder.dart was using the output unit of the deferred
import instead of the output unit of the deferred constant field.

(fixes #31306)
Bug: https://github.com/dart-lang/sdk/issues/31306
Change-Id: I557983c5ec85f2aa6adb486961dd2f79852e8d5a
Reviewed-on: https://dart-review.googlesource.com/32201
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-04 00:16:25 +00:00

19 lines
663 B
Dart

// Copyright (c) 2018, 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.
/// Regression test for issue https://github.com/dart-lang/sdk/issues/31306.
///
/// When 1 constant was imported in two libraries by using the same exact
/// deferred import URI, the deferred-constant initializer was incorrectly moved
/// to the main output unit.
import '../libs/shared_constant_a.dart';
import '../libs/shared_constant_b.dart';
/*element: main:OutputUnit(main, {})*/
main() async {
(await doA()).method();
await doB();
}