| Index: pkg/compiler/lib/src/compiler.dart
|
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
|
| index daa630c1a5fe9659ae7d6b8b9145bd2acc238134..6854c9b506995aaa669a89bda95f1ed6a36bc493 100644
|
| --- a/pkg/compiler/lib/src/compiler.dart
|
| +++ b/pkg/compiler/lib/src/compiler.dart
|
| @@ -871,21 +871,24 @@ abstract class Compiler extends DiagnosticListener {
|
| return null;
|
| }
|
|
|
| - if (!enableExperimentalMirrors &&
|
| - loadedLibraries.containsLibrary(Uris.dart_mirrors)) {
|
| + bool importsMirrorsLibrary =
|
| + loadedLibraries.containsLibrary(Uris.dart_mirrors);
|
| + if (importsMirrorsLibrary && !backend.supportsReflection) {
|
| Set<String> importChains =
|
| computeImportChainsFor(loadedLibraries, Uris.dart_mirrors);
|
| - if (!backend.supportsReflection) {
|
| - reportErrorMessage(
|
| - NO_LOCATION_SPANNABLE,
|
| - MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND);
|
| - } else {
|
| - reportWarningMessage(
|
| - NO_LOCATION_SPANNABLE,
|
| - MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
|
| - {'importChain': importChains.join(
|
| - MessageTemplate.IMPORT_EXPERIMENTAL_MIRRORS_PADDING)});
|
| - }
|
| + reportErrorMessage(
|
| + NO_LOCATION_SPANNABLE,
|
| + MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND,
|
| + {'importChain': importChains.join(
|
| + MessageTemplate.MIRRORS_NOT_SUPPORTED_BY_BACKEND_PADDING)});
|
| + } else if (importsMirrorsLibrary && !enableExperimentalMirrors) {
|
| + Set<String> importChains =
|
| + computeImportChainsFor(loadedLibraries, Uris.dart_mirrors);
|
| + reportWarningMessage(
|
| + NO_LOCATION_SPANNABLE,
|
| + MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
|
| + {'importChain': importChains.join(
|
| + MessageTemplate.IMPORT_EXPERIMENTAL_MIRRORS_PADDING)});
|
| }
|
|
|
| functionClass.ensureResolved(this);
|
|
|