| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of types; | 5 part of types; |
| 6 | 6 |
| 7 class CancelTypeInferenceException { | 7 class CancelTypeInferenceException { |
| 8 final Node node; | 8 final Node node; |
| 9 final String reason; | 9 final String reason; |
| 10 | 10 |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 } | 1030 } |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 if (receiverType.isUnkown()) { | 1033 if (receiverType.isUnkown()) { |
| 1034 for (FunctionElement member in inferrer.getMembersByName(source)) { | 1034 for (FunctionElement member in inferrer.getMembersByName(source)) { |
| 1035 Element classElem = member.getEnclosingClass(); | 1035 Element classElem = member.getEnclosingClass(); |
| 1036 BaseType baseReceiverType = new ClassBaseType(classElem); | 1036 BaseType baseReceiverType = new ClassBaseType(classElem); |
| 1037 augmentField(baseReceiverType, member); | 1037 augmentField(baseReceiverType, member); |
| 1038 } | 1038 } |
| 1039 } else { | 1039 } else { |
| 1040 for (ClassBaseType baseReceiverType in receiverType.baseTypes) { | 1040 for (BaseType baseReceiverType in receiverType.baseTypes) { |
| 1041 Element member = baseReceiverType.element.lookupMember(source); | 1041 if (!baseReceiverType.isClass()) continue; |
| 1042 ClassBaseType baseReceiverClassType = baseReceiverType; |
| 1043 Element member = baseReceiverClassType.element.lookupMember(source); |
| 1042 if (member != null) { | 1044 if (member != null) { |
| 1043 augmentField(baseReceiverType, member); | 1045 augmentField(baseReceiverClassType, member); |
| 1044 } | 1046 } |
| 1045 } | 1047 } |
| 1046 } | 1048 } |
| 1047 return argumentType; | 1049 return argumentType; |
| 1048 } | 1050 } |
| 1049 | 1051 |
| 1050 SourceString canonicalizeCompoundOperator(String op) { | 1052 SourceString canonicalizeCompoundOperator(String op) { |
| 1051 // TODO(ahe): This class should work on elements or selectors, not | 1053 // TODO(ahe): This class should work on elements or selectors, not |
| 1052 // names. Otherwise, it is repeating work the resolver has | 1054 // names. Otherwise, it is repeating work the resolver has |
| 1053 // already done (or should have done). In this case, the problem | 1055 // already done (or should have done). In this case, the problem |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 } | 1455 } |
| 1454 | 1456 |
| 1455 void internalError(String reason, {Node node}) { | 1457 void internalError(String reason, {Node node}) { |
| 1456 inferrer.fail(node, reason); | 1458 inferrer.fail(node, reason); |
| 1457 } | 1459 } |
| 1458 | 1460 |
| 1459 ConcreteType visitTypeReferenceSend(Send) { | 1461 ConcreteType visitTypeReferenceSend(Send) { |
| 1460 return new ConcreteType.singleton(inferrer.baseTypes.typeBaseType); | 1462 return new ConcreteType.singleton(inferrer.baseTypes.typeBaseType); |
| 1461 } | 1463 } |
| 1462 } | 1464 } |
| OLD | NEW |