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

Unified Diff: lib/src/compiler/js_field_storage.dart

Issue 1966763004: always emit lazy field if overriding static (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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: lib/src/compiler/js_field_storage.dart
diff --git a/lib/src/compiler/js_field_storage.dart b/lib/src/compiler/js_field_storage.dart
index b66d41c6cc214c9c6474caa038ba93acf75c5d35..8c29ac4cb725beb38309970927721e731588a398 100644
--- a/lib/src/compiler/js_field_storage.dart
+++ b/lib/src/compiler/js_field_storage.dart
@@ -16,22 +16,15 @@ class PropertyOverrideResult {
PropertyOverrideResult(this.foundGetter, this.foundSetter);
}
-PropertyOverrideResult checkForPropertyOverride(FieldElement field,
- List<ClassElement> superclasses, ExtensionTypeSet extensionTypes) {
+PropertyOverrideResult checkForPropertyOverride(
+ FieldElement field, List<ClassElement> superclasses) {
bool foundGetter = false;
bool foundSetter = false;
for (var superclass in superclasses) {
- // Stop if we reach a native type.
- if (extensionTypes.isNativeClass(superclass)) break;
-
var superprop = getProperty(superclass, field.library, field.name);
if (superprop == null) continue;
- // Static fields can override superclass static fields. However, we need to
- // handle the case where they override a getter or setter.
- if (field.isStatic && !superprop.isSynthetic) continue;
-
var getter = superprop.getter;
bool hasGetter = getter != null && !getter.isAbstract;
if (hasGetter) foundGetter = true;

Powered by Google App Engine
This is Rietveld 408576698