| Index: pkg/analyzer/lib/src/generated/resolver.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
|
| index 0c911d47702e51c241867ed5e360b0a0cc5b5fa4..cc92bafdbfc96031d4f0582548483a037ff615e5 100644
|
| --- a/pkg/analyzer/lib/src/generated/resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/resolver.dart
|
| @@ -8857,6 +8857,25 @@ class LibraryResolver {
|
| }
|
| }
|
| computer.computeValues();
|
| + // As a temporary workaround for issue 21572, run ConstantVerifier now.
|
| + // TODO(paulberry): remove this workaround once issue 21572 is fixed.
|
| + for (Library library in _librariesInCycles) {
|
| + for (Source source in library.compilationUnitSources) {
|
| + try {
|
| + CompilationUnit unit = library.getAST(source);
|
| + ErrorReporter errorReporter = new ErrorReporter(
|
| + _errorListener, source);
|
| + ConstantVerifier constantVerifier = new ConstantVerifier(
|
| + errorReporter, library.libraryElement, _typeProvider);
|
| + unit.accept(constantVerifier);
|
| + } on AnalysisException catch (exception, stackTrace) {
|
| + AnalysisEngine.instance.logger.logError(
|
| + "Internal Error: Could not access AST for ${source.fullName} "
|
| + "during constant verification",
|
| + new CaughtException(exception, stackTrace));
|
| + }
|
| + }
|
| + }
|
| } finally {
|
| timeCounter.stop();
|
| }
|
| @@ -9382,6 +9401,19 @@ class LibraryResolver2 {
|
| }
|
| }
|
| computer.computeValues();
|
| + // As a temporary workaround for issue 21572, run ConstantVerifier now.
|
| + // TODO(paulberry): remove this workaround once issue 21572 is fixed.
|
| + for (ResolvableLibrary library in _librariesInCycle) {
|
| + for (ResolvableCompilationUnit unit in
|
| + library.resolvableCompilationUnits) {
|
| + CompilationUnit ast = unit.compilationUnit;
|
| + ErrorReporter errorReporter = new ErrorReporter(
|
| + _errorListener, unit.source);
|
| + ConstantVerifier constantVerifier = new ConstantVerifier(
|
| + errorReporter, library.libraryElement, _typeProvider);
|
| + ast.accept(constantVerifier);
|
| + }
|
| + }
|
| } finally {
|
| timeCounter.stop();
|
| }
|
|
|