42e6cf4967
This reverts commit daf91f56b9.
Reason for revert: Analyzer and CFE disagree
Original change's description:
> [vm] Fix some further mirror breaks with frontend NNBD checks enabled.
>
> Change-Id: I3c52dac2244c1f7eae59d85bc637cce2cbb3faa9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139302
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
TBR=rmacnak@google.com,asiva@google.com,regis@google.com
Change-Id: I2f13dac7f2d7441f8db61543261ca28f500b8adc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139319
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
27 lines
861 B
Dart
27 lines
861 B
Dart
// Copyright (c) 2015, 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.
|
|
|
|
library library_enumeration_deferred_loading;
|
|
|
|
import 'dart:mirrors';
|
|
import 'package:expect/expect.dart';
|
|
import 'package:async_helper/async_helper.dart';
|
|
|
|
import 'other_library.dart' deferred as other;
|
|
|
|
main() {
|
|
var ms = currentMirrorSystem();
|
|
Expect.throws(() => ms.findLibrary(#test.other_library), (e) => true,
|
|
"should not be loaded yet");
|
|
|
|
asyncStart();
|
|
other.loadLibrary().then((_) {
|
|
asyncEnd();
|
|
LibraryMirror otherMirror = ms.findLibrary(#test.other_library);
|
|
Expect.isNotNull(otherMirror);
|
|
Expect.equals(#test.other_library, otherMirror.simpleName);
|
|
Expect.equals(42, other.topLevelMethod());
|
|
});
|
|
}
|