| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library engine.resolver.element_resolver; | 5 library engine.resolver.element_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart'; | 9 import 'ast.dart'; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 } | 722 } |
| 723 if (!_enableStrictCallChecks && | 723 if (!_enableStrictCallChecks && |
| 724 targetType != null && | 724 targetType != null && |
| 725 targetType.isDartCoreFunction && | 725 targetType.isDartCoreFunction && |
| 726 methodName.name == FunctionElement.CALL_METHOD_NAME) { | 726 methodName.name == FunctionElement.CALL_METHOD_NAME) { |
| 727 // TODO(brianwilkerson) Can we ever resolve the function being | 727 // TODO(brianwilkerson) Can we ever resolve the function being |
| 728 // invoked? | 728 // invoked? |
| 729 // resolveArgumentsToParameters(node.getArgumentList(), invokedFunction
); | 729 // resolveArgumentsToParameters(node.getArgumentList(), invokedFunction
); |
| 730 return null; | 730 return null; |
| 731 } | 731 } |
| 732 ClassElementImpl typeReference = getTypeReference(target); |
| 733 if (typeReference != null) { |
| 734 ConstructorElement constructor = |
| 735 typeReference.getNamedConstructor(methodName.name); |
| 736 if (constructor != null) { |
| 737 _recordUndefinedNode( |
| 738 typeReference, |
| 739 StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR, |
| 740 methodName, |
| 741 [methodName.name, typeReference.name]); |
| 742 return null; |
| 743 } |
| 744 } |
| 732 targetTypeName = targetType == null ? null : targetType.displayName; | 745 targetTypeName = targetType == null ? null : targetType.displayName; |
| 733 ErrorCode proxyErrorCode = (generatedWithTypePropagation | 746 ErrorCode proxyErrorCode = (generatedWithTypePropagation |
| 734 ? HintCode.UNDEFINED_METHOD | 747 ? HintCode.UNDEFINED_METHOD |
| 735 : StaticTypeWarningCode.UNDEFINED_METHOD); | 748 : StaticTypeWarningCode.UNDEFINED_METHOD); |
| 736 _recordUndefinedNode(targetType.element, proxyErrorCode, methodName, | 749 _recordUndefinedNode(targetType.element, proxyErrorCode, methodName, |
| 737 [methodName.name, targetTypeName]); | 750 [methodName.name, targetTypeName]); |
| 738 } | 751 } |
| 739 } else if (identical( | 752 } else if (identical( |
| 740 errorCode, StaticTypeWarningCode.UNDEFINED_SUPER_METHOD)) { | 753 errorCode, StaticTypeWarningCode.UNDEFINED_SUPER_METHOD)) { |
| 741 // Generate the type name. | 754 // Generate the type name. |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2567 | 2580 |
| 2568 @override | 2581 @override |
| 2569 Element get staticElement => null; | 2582 Element get staticElement => null; |
| 2570 | 2583 |
| 2571 @override | 2584 @override |
| 2572 accept(AstVisitor visitor) => null; | 2585 accept(AstVisitor visitor) => null; |
| 2573 | 2586 |
| 2574 @override | 2587 @override |
| 2575 void visitChildren(AstVisitor visitor) {} | 2588 void visitChildren(AstVisitor visitor) {} |
| 2576 } | 2589 } |
| OLD | NEW |