| Index: pkg/analyzer/lib/src/dart/constant/evaluation.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
|
| index da2db5551640abb588293d10c67fc6c99ec14154..30d69951d061ce4012478e844ba134ebe28f6d8c 100644
|
| --- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
|
| +++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
|
| @@ -347,7 +347,13 @@ class ConstantEvaluationEngine {
|
| // This could happen in the event of invalid code. The error will be
|
| // reported at constant evaluation time.
|
| }
|
| - if (constNode.arguments != null) {
|
| + if (constNode == null) {
|
| + // We cannot determine what element the annotation is on, nor the offset
|
| + // of the annotation, so there's not a lot of information in this
|
| + // message, but it's better than getting an exception.
|
| + AnalysisEngine.instance.logger.logInformation(
|
| + 'No annotationAst for $constant in ${constant.compilationUnit}');
|
| + } else if (constNode.arguments != null) {
|
| constNode.arguments.accept(referenceFinder);
|
| }
|
| } else if (constant is VariableElement) {
|
|
|