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

Unified Diff: pkg/compiler/lib/src/serialization/element_serialization.dart

Issue 2619243002: Make .enclosingClass always return the declaration (Closed)
Patch Set: Add comment. 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/compiler/lib/src/serialization/element_serialization.dart
diff --git a/pkg/compiler/lib/src/serialization/element_serialization.dart b/pkg/compiler/lib/src/serialization/element_serialization.dart
index 743952ec07d050d82b8cc57c6e1c013a6876c785..0e5c562fc1340392372c47992c9b34b830bbd65b 100644
--- a/pkg/compiler/lib/src/serialization/element_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/element_serialization.dart
@@ -166,8 +166,7 @@ class SerializerUtil {
static void serializeParentRelation(Element element, ObjectEncoder encoder) {
if (element.enclosingClass != null) {
encoder.setElement(Key.CLASS, element.enclosingClass);
- if (element.enclosingClass.declaration.compilationUnit !=
- element.compilationUnit) {
+ if (element.enclosingClass.compilationUnit != element.compilationUnit) {
encoder.setElement(Key.COMPILATION_UNIT, element.compilationUnit);
}
} else {

Powered by Google App Engine
This is Rietveld 408576698