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' |