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 63448b83172b3def29be45248238e0facd05aa85..98529ac530cf5eae5b67e9963c409f0c87ba19e2 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 |
@@ -397,7 +397,9 @@ class ProgramBuilder { |
if (returnType.isFunctionType) { |
functionType = returnType; |
} else if (returnType.treatAsDynamic || |
- _compiler.types.isSubtype(returnType, |
+ _compiler.types.isSubtype( |
+ returnType, |
+ // ignore: UNNECESSARY_CAST |
backend.commonElements.functionType as DartType)) { |
if (returnType.isTypedef) { |
ResolutionTypedefType typedef = returnType; |