Index: lib/compiler/implementation/js_backend/backend.dart |
diff --git a/lib/compiler/implementation/js_backend/backend.dart b/lib/compiler/implementation/js_backend/backend.dart |
index d34fc632d0e5fa3a41b70ca4936b08ce43bdeed8..11dec00646645f8338222b8c016866a7db925759 100644 |
--- a/lib/compiler/implementation/js_backend/backend.dart |
+++ b/lib/compiler/implementation/js_backend/backend.dart |
@@ -31,8 +31,9 @@ class ReturnInfo { |
} |
} |
- addCompiledFunction(FunctionElement function) => |
- compiledFunctions.add(function); |
+ // Note that lazy initializers are treated like functions (but are not |
+ // of type [FunctionElement]. |
+ addCompiledFunction(Element function) => compiledFunctions.add(function); |
} |
class HTypeList { |
@@ -552,7 +553,7 @@ class JavaScriptBackend extends Backend { |
* function [callee] has not yet been compiled the returned type is [null]. |
*/ |
HType optimisticReturnTypesWithRecompilationOnTypeChange( |
- FunctionElement caller, FunctionElement callee) { |
+ Element caller, FunctionElement callee) { |
returnInfo.putIfAbsent(callee, () => new ReturnInfo.unknownType()); |
ReturnInfo info = returnInfo[callee]; |
if (info.returnType != HType.UNKNOWN && caller != null) { |