Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
index f399fa34020c504e66294ce0281f024fddba4bef..94839faa7f30f88ee44dbe0e796bfa8ed5efc5bb 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
@@ -690,6 +690,23 @@ class KernelField extends Field { |
KernelTypeInferrer _typeInferrer; |
KernelField(Name name, {String fileUri}) : super(name, fileUri: fileUri) {} |
+ |
+ static FieldNode getFieldNode(Field field) { |
+ if (field is KernelField) return field._fieldNode; |
+ return null; |
+ } |
+ |
+ static void recordOverride( |
+ KernelField field, Member overriddenMember, bool isSetter) { |
+ if (field._fieldNode != null) { |
+ if (isSetter && overriddenMember is Field) { |
+ // When overriding a field, we are called twice; once for the setter and |
+ // once for the getter. Ignore the setter. |
+ return; |
+ } |
+ field._fieldNode.overrides.add(overriddenMember); |
+ } |
+ } |
} |
/// Concrete shadow object representing a for-in loop in kernel form. |