Index: pkg/compiler/lib/src/resolution/members.dart |
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart |
index 14c1aab6aa0faf0cd28f1e984a8d103f96f416fd..95631094037e991399034490e3ac11dc8a62b3fd 100644 |
--- a/pkg/compiler/lib/src/resolution/members.dart |
+++ b/pkg/compiler/lib/src/resolution/members.dart |
@@ -456,8 +456,14 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
resolver.constantCompiler.compileConstant(parameter); |
}); |
}); |
+ if (!functionSignature.returnType.isDynamic) { |
+ registry.registerTypeUse( |
+ new TypeUse.checkedModeCheck(functionSignature.returnType)); |
+ } |
functionSignature.forEachParameter((ParameterElement element) { |
- registry.registerTypeUse(new TypeUse.checkedModeCheck(element.type)); |
+ if (!element.type.isDynamic) { |
+ registry.registerTypeUse(new TypeUse.checkedModeCheck(element.type)); |
+ } |
}); |
} |