Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(912)

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 2658483002: Fix summary handling of invalid annotations of the form `@a.b.c`. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index f60514c7574e3a6cb13dd5555ee9be0b139c903b..54b585457373b1c739ceaf3424b6de10557cb29c 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1521,6 +1521,15 @@ class _UnitResynthesizer {
elementAnnotation.annotationAst = AstTestFactory.annotation2(
typeName, constructorName, constExpr.argumentList)
..element = constExpr.staticElement;
+ } else if (constExpr is PropertyAccess) {
+ var target = constExpr.target as Identifier;
+ var propertyName = constExpr.propertyName;
+ ArgumentList arguments =
+ constExpr.getProperty(_ConstExprBuilder.ARGUMENT_LIST);
+ elementAnnotation.element = propertyName.staticElement;
+ elementAnnotation.annotationAst = AstTestFactory.annotation2(
+ target, propertyName, arguments)
+ ..element = propertyName.staticElement;
} else {
throw new StateError(
'Unexpected annotation type: ${constExpr.runtimeType}');
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698