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

Unified Diff: pkg/analyzer/test/src/summary/element_text.dart

Issue 2990733002: Don't resynthesize invalid constant expressions at all. (Closed)
Patch Set: Created 3 years, 5 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/test/src/summary/element_text.dart
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index c7897de4f32758a5f1824bb48b24292a6075658e..ef36e94ba9290e3393991e64498c9416f29b53ac 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -278,7 +278,9 @@ class _ElementWriter {
buffer.write('(');
}
- if (e is Annotation) {
+ if (e == null) {
+ buffer.write('<null>');
+ } else if (e is Annotation) {
buffer.write('@');
writeExpression(e.name);
if (e.constructorName != null) {
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698