Index: pkg/compiler/lib/src/resolution/class_members.dart |
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart |
index 928f319ef756c543167865a935e57a87ac4d2eee..449173373f7fc9884d5d3f0024b21a44a29d57bd 100644 |
--- a/pkg/compiler/lib/src/resolution/class_members.dart |
+++ b/pkg/compiler/lib/src/resolution/class_members.dart |
@@ -4,6 +4,8 @@ |
library dart2js.resolution.compute_members; |
+import '../common/names.dart' show |
+ Identifiers; |
import '../compiler.dart' show |
Compiler, |
isPrivateName; |
@@ -60,7 +62,8 @@ abstract class MembersCreator { |
bool shouldSkipName(String name) { |
return computedMemberNames != null && |
- computedMemberNames.contains(name); |
+ // 'call' is implicitly contained in [computedMemberNames]. |
+ (name == Identifiers.call || computedMemberNames.contains(name)); |
} |
/// Compute all members of [cls] with the given names. |
@@ -306,7 +309,7 @@ abstract class MembersCreator { |
assert(!cls.isAbstract); |
if (cls.asInstanceOf(compiler.functionClass) == null) return; |
- if (cls.lookupMember(Compiler.CALL_OPERATOR_NAME) != null) return; |
+ if (cls.lookupMember(Identifiers.call) != null) return; |
// TODO(johnniwinther): Make separate methods for backend exceptions. |
// Avoid warnings on backend implementation classes for closures. |
if (compiler.backend.isBackendLibrary(cls.library)) return; |
@@ -314,8 +317,8 @@ abstract class MembersCreator { |
reportMessage(compiler.functionClass, MessageKind.UNIMPLEMENTED_METHOD, () { |
compiler.reportWarning(cls, MessageKind.UNIMPLEMENTED_METHOD_ONE, |
{'class': cls.name, |
- 'name': Compiler.CALL_OPERATOR_NAME, |
- 'method': Compiler.CALL_OPERATOR_NAME, |
+ 'name': Identifiers.call, |
+ 'method': Identifiers.call, |
'declarer': compiler.functionClass.name}); |
}); |
} |
@@ -845,7 +848,7 @@ abstract class ClassMemberMixin implements ClassElement { |
if (computedMemberNames == null) { |
computedMemberNames = _EMPTY_MEMBERS_NAMES; |
} |
- if (name != Compiler.CALL_OPERATOR_NAME) { |
+ if (name != Identifiers.call) { |
Setlet<String> set; |
if (identical(computedMemberNames, _EMPTY_MEMBERS_NAMES)) { |
computedMemberNames = set = new Setlet<String>(); |
@@ -872,7 +875,7 @@ abstract class ClassMemberMixin implements ClassElement { |
if (computedMemberNames == null) { |
return classMembers != null; |
} else { |
- return name == Compiler.CALL_OPERATOR_NAME || |
+ return name == Identifiers.call || |
computedMemberNames.contains(name); |
} |
} |