| 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 resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element get currentElement; | 8 Element get currentElement; |
| 9 Setlet<Node> get superUses; | 9 Setlet<Node> get superUses; |
| 10 | 10 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 // Hack: Use unparser to test parameter equality. This only works | 448 // Hack: Use unparser to test parameter equality. This only works |
| 449 // because we are restricting patch uses and the approach cannot be used | 449 // because we are restricting patch uses and the approach cannot be used |
| 450 // elsewhere. | 450 // elsewhere. |
| 451 | 451 |
| 452 // The node contains the type, so there is a potential overlap. | 452 // The node contains the type, so there is a potential overlap. |
| 453 // Therefore we only check the text if the types are identical. | 453 // Therefore we only check the text if the types are identical. |
| 454 String originParameterText = | 454 String originParameterText = |
| 455 originParameter.parseNode(compiler).toString(); | 455 originParameter.parseNode(compiler).toString(); |
| 456 String patchParameterText = | 456 String patchParameterText = |
| 457 patchParameter.parseNode(compiler).toString(); | 457 patchParameter.parseNode(compiler).toString(); |
| 458 if (originParameterText != patchParameterText) { | 458 if (originParameterText != patchParameterText |
| 459 // We special case the list constructor because of the |
| 460 // optional parameter. |
| 461 && origin != compiler.unnamedListConstructor) { |
| 459 compiler.reportError( | 462 compiler.reportError( |
| 460 originParameter.parseNode(compiler), | 463 originParameter.parseNode(compiler), |
| 461 MessageKind.PATCH_PARAMETER_MISMATCH, | 464 MessageKind.PATCH_PARAMETER_MISMATCH, |
| 462 {'methodName': origin.name, | 465 {'methodName': origin.name, |
| 463 'originParameter': originParameterText, | 466 'originParameter': originParameterText, |
| 464 'patchParameter': patchParameterText}); | 467 'patchParameter': patchParameterText}); |
| 465 compiler.reportInfo(patchParameter, | 468 compiler.reportInfo(patchParameter, |
| 466 MessageKind.PATCH_POINT_TO_PARAMETER, | 469 MessageKind.PATCH_POINT_TO_PARAMETER, |
| 467 {'parameterName': patchParameter.name}); | 470 {'parameterName': patchParameter.name}); |
| 468 } | 471 } |
| (...skipping 4361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4830 } | 4833 } |
| 4831 | 4834 |
| 4832 /// The result for the resolution of the `assert` method. | 4835 /// The result for the resolution of the `assert` method. |
| 4833 class AssertResult implements ResolutionResult { | 4836 class AssertResult implements ResolutionResult { |
| 4834 const AssertResult(); | 4837 const AssertResult(); |
| 4835 | 4838 |
| 4836 Element get element => null; | 4839 Element get element => null; |
| 4837 | 4840 |
| 4838 String toString() => 'AssertResult()'; | 4841 String toString() => 'AssertResult()'; |
| 4839 } | 4842 } |
| OLD | NEW |