| Index: pkg/analyzer/lib/src/task/strong/checker.dart
|
| diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| index b20d702e71f4f1c4fa53b9c4974e48b22260857e..8b21d95a2b41217eaf79f90c223b0bdc87948988 100644
|
| --- a/pkg/analyzer/lib/src/task/strong/checker.dart
|
| +++ b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| @@ -21,7 +21,7 @@ import 'package:analyzer/src/generated/type_system.dart';
|
|
|
| import 'ast_properties.dart';
|
|
|
| -bool isKnownFunction(Expression expression, {bool instanceMethods: false}) {
|
| +bool isKnownFunction(Expression expression) {
|
| Element element = null;
|
| if (expression is ParenthesizedExpression) {
|
| expression = (expression as ParenthesizedExpression).expression;
|
| @@ -36,7 +36,7 @@ bool isKnownFunction(Expression expression, {bool instanceMethods: false}) {
|
| // First class functions and static methods, where we know the original
|
| // declaration, will have an exact type, so we know a downcast will fail.
|
| return element is FunctionElement ||
|
| - element is MethodElement && (instanceMethods || element.isStatic);
|
| + element is MethodElement;
|
| }
|
|
|
| DartType _elementType(Element e) {
|
| @@ -1004,7 +1004,7 @@ class CodeChecker extends RecursiveAstVisitor {
|
| // a dynamic parameter type requires a dynamic call in general.
|
| // However, as an optimization, if we have an original definition, we know
|
| // dynamic is reified as Object - in this case a regular call is fine.
|
| - if (isKnownFunction(call, instanceMethods: true)) {
|
| + if (isKnownFunction(call)) {
|
| return false;
|
| }
|
| return rules.anyParameterType(ft, (pt) => pt.isDynamic);
|
|
|