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

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

Issue 2981943002: Resynthesize top-level variables from Kernel. (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 ef565d4ffc1358af5bf65bfb90c32be1e4dea804..1e661c0fc6bf055514bbf8f94b3617564c2b0f48 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -694,6 +694,17 @@ class _ElementWriter {
DartType type = e.type;
expect(type, isNotNull);
+ if (!e.isSynthetic) {
+ expect(e.getter, isNotNull);
+ expect(e.getter.isSynthetic, isTrue);
+ expect(e.getter.variable, same(e));
+ if (!e.isFinal && !e.isConst) {
+ expect(e.setter, isNotNull);
+ expect(e.setter.isSynthetic, isTrue);
+ expect(e.setter.variable, same(e.getter.variable));
+ }
Paul Berry 2017/07/15 15:33:17 Consider adding: else { expect(e.setter, isNull
+ }
+
if (e.enclosingElement is ClassElement) {
writeDocumentation(e, ' ');
writeMetadata(e, ' ', '\n');
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698