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

Unified Diff: pkg/compiler/lib/src/elements/common.dart

Issue 2810683002: Use entities in Selector methods (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/common.dart
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index d61a57dc8a4059a2715b509f362ffcb94a11b930..1a740e3a04bd1725ea63da02ba6ec05ae989aabe 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -217,16 +217,16 @@ abstract class ClassElementCommon implements ClassElement {
* When called on the implementation element both members declared in the
* origin and the patch class are returned.
*/
- Element lookupByName(Name memberName, {ClassElement stopAt}) {
+ MemberElement lookupByName(Name memberName, {ClassElement stopAt}) {
return internalLookupByName(memberName,
isSuperLookup: false, stopAtSuperclass: stopAt);
}
- Element lookupSuperByName(Name memberName) {
+ MemberElement lookupSuperByName(Name memberName) {
return internalLookupByName(memberName, isSuperLookup: true);
}
- Element internalLookupByName(Name memberName,
+ MemberElement internalLookupByName(Name memberName,
{bool isSuperLookup, ClassElement stopAtSuperclass}) {
String name = memberName.text;
bool isPrivate = memberName.isPrivate;
@@ -250,8 +250,8 @@ abstract class ClassElementCommon implements ClassElement {
// for. Otherwise, we continue up the superclass chain.
if (member.isAbstractField) {
AbstractFieldElement field = member;
- FunctionElement getter = field.getter;
- FunctionElement setter = field.setter;
+ GetterElement getter = field.getter;
+ SetterElement setter = field.setter;
if (memberName.isSetter) {
// Abstract members can be defined in a super class.
if (setter != null && !setter.isAbstract) {
@@ -263,7 +263,7 @@ abstract class ClassElementCommon implements ClassElement {
}
}
// Abstract members can be defined in a super class.
- } else if (!member.isAbstract) {
+ } else if (!member.isAbstract && !member.isMalformed) {
return member;
}
}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698