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

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

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Address review comments Created 4 years 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/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index ddff695e4bc54cad046edeb511220d73572b5882..5a9cb92430098beee0406c5ffc0c627bbb8868af 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -5,6 +5,7 @@
library test.src.serialization.elements_test;
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
import 'package:analyzer/dart/constant/value.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
@@ -393,8 +394,9 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
// In 'class C {static const a = 0; static const b = a;}' the reference
// to 'a' in 'b' is serialized as a fully qualified 'C.a' reference.
if (r.prefix.staticElement is ClassElement) {
+ Element oElement = resolutionMap.staticElementForIdentifier(o);
compareElements(
- r.prefix.staticElement, o.staticElement?.enclosingElement, desc);
+ r.prefix.staticElement, oElement?.enclosingElement, desc);
compareConstAsts(r.identifier, o, desc);
} else {
fail('Prefix of type ${r.prefix.staticElement.runtimeType} should not'

Powered by Google App Engine
This is Rietveld 408576698