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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart

Issue 2943273002: Implement type inference of getters/setters based on inheritance. (Closed)
Patch Set: Created 3 years, 6 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/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index 9709113adbd04a55b039830306f09c876111aaba..7630c71e5cf8096a63744be0fe88cd75a57bd228 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -5,7 +5,7 @@
library fasta.kernel_class_builder;
import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
- show KernelField;
+ show KernelMember;
import 'package:kernel/ast.dart'
show
@@ -199,11 +199,12 @@ abstract class KernelClassBuilder
}
// TODO(ahe): Handle other cases: accessors, operators, and fields.
- // Also record any cases where a field overrides something in a superclass,
- // since this information will be needed for type inference.
- if (declaredMember is KernelField &&
+ // Also record any cases where a field or getter/setter overrides something
+ // in a superclass, since this information will be needed for type
+ // inference.
+ if (declaredMember is KernelMember &&
identical(declaredMember.enclosingClass, cls)) {
- KernelField.recordOverride(declaredMember, interfaceMember, isSetter);
+ KernelMember.recordOverride(declaredMember, interfaceMember);
}
}

Powered by Google App Engine
This is Rietveld 408576698