Index: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
index 3f612d3ca002ddeadc0b828882e27cbdb5dd48c9..79eff9ac5d79f63e099f90313b26974df45720af 100644 |
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart |
@@ -29,6 +29,7 @@ import '../../elements/elements.dart' |
ParameterElement, |
TypedefElement, |
VariableElement; |
+import '../../elements/types.dart' show DartType; |
import '../../js/js.dart' as js; |
import '../../js_backend/backend_helpers.dart' show BackendHelpers; |
import '../../js_backend/js_backend.dart' |
@@ -396,8 +397,8 @@ class ProgramBuilder { |
if (returnType.isFunctionType) { |
functionType = returnType; |
} else if (returnType.treatAsDynamic || |
- _compiler.types.isSubtype( |
- returnType, backend.commonElements.functionType)) { |
+ _compiler.types.isSubtype(returnType, |
+ backend.commonElements.functionType as DartType)) { |
if (returnType.isTypedef) { |
ResolutionTypedefType typedef = returnType; |
// TODO(jacobr): can we just use typdef.unaliased instead? |