| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analysis_server.src.status.validator; | 5 library analysis_server.src.status.validator; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 (VariableElement element) => | 701 (VariableElement element) => |
| 702 element.isConst ? 'a const $kind' : 'a non-const $kind'); | 702 element.isConst ? 'a const $kind' : 'a non-const $kind'); |
| 703 } | 703 } |
| 704 if (expected.isFinal != actual.isFinal) { | 704 if (expected.isFinal != actual.isFinal) { |
| 705 _writeMismatch( | 705 _writeMismatch( |
| 706 expected, | 706 expected, |
| 707 actual, | 707 actual, |
| 708 (VariableElement element) => | 708 (VariableElement element) => |
| 709 element.isFinal ? 'a final $kind' : 'a non-final $kind'); | 709 element.isFinal ? 'a final $kind' : 'a non-final $kind'); |
| 710 } | 710 } |
| 711 if (expected.isPotentiallyMutatedInClosure != | |
| 712 actual.isPotentiallyMutatedInClosure) { | |
| 713 _writeMismatch( | |
| 714 expected, | |
| 715 actual, | |
| 716 (VariableElement element) => element.isPotentiallyMutatedInClosure | |
| 717 ? 'a $kind that is potentially mutated in a closure' | |
| 718 : 'a $kind that is not mutated in a closure'); | |
| 719 } | |
| 720 if (expected.isPotentiallyMutatedInScope != | |
| 721 actual.isPotentiallyMutatedInScope) { | |
| 722 _writeMismatch( | |
| 723 expected, | |
| 724 actual, | |
| 725 (VariableElement element) => element.isPotentiallyMutatedInScope | |
| 726 ? 'a $kind that is potentially mutated in its scope' | |
| 727 : 'a $kind that is not mutated in its scope'); | |
| 728 } | |
| 729 if (expected.isStatic != actual.isStatic) { | 711 if (expected.isStatic != actual.isStatic) { |
| 730 _writeMismatch( | 712 _writeMismatch( |
| 731 expected, | 713 expected, |
| 732 actual, | 714 actual, |
| 733 (VariableElement element) => | 715 (VariableElement element) => |
| 734 element.isStatic ? 'a static $kind' : 'an instance $kind'); | 716 element.isStatic ? 'a static $kind' : 'an instance $kind'); |
| 735 } | 717 } |
| 736 // | 718 // |
| 737 // Compare children. | 719 // Compare children. |
| 738 // | 720 // |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 * Determine whether or not there is any interesting difference between the | 1760 * Determine whether or not there is any interesting difference between the |
| 1779 * original and cloned values. | 1761 * original and cloned values. |
| 1780 */ | 1762 */ |
| 1781 void _performComparison() { | 1763 void _performComparison() { |
| 1782 StringBuffer buffer = new StringBuffer(); | 1764 StringBuffer buffer = new StringBuffer(); |
| 1783 if (!_compareObjects(cloneValue, originalValue, buffer)) { | 1765 if (!_compareObjects(cloneValue, originalValue, buffer)) { |
| 1784 description = buffer.toString(); | 1766 description = buffer.toString(); |
| 1785 } | 1767 } |
| 1786 } | 1768 } |
| 1787 } | 1769 } |
| OLD | NEW |