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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 13513003: Handle call properties in is-checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « no previous file | tests/language/call_property_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index d4df75d16bc34ec30a8e6f3ed970bbb8516cebf2..e641095dd79499dc6c737d4257dd62498594f27c 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -1694,12 +1694,12 @@ class CodeEmitterTask extends CompilerTask {
// [Function] and needs checks for all typedefs that are used in is-checks.
if (checkedClasses.contains(compiler.functionClass) ||
!checkedTypedefs.isEmpty) {
- FunctionElement call = cls.lookupLocalMember(Compiler.CALL_OPERATOR_NAME);
+ Element call = cls.lookupLocalMember(Compiler.CALL_OPERATOR_NAME);
if (call == null) {
// If [cls] is a closure, it has a synthetic call operator method.
call = cls.lookupBackendMember(Compiler.CALL_OPERATOR_NAME);
}
- if (call != null) {
+ if (call != null && call.isFunction()) {
generateInterfacesIsTests(compiler.functionClass,
emitIsTest,
emitSubstitution,
« no previous file with comments | « no previous file | tests/language/call_property_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698