| 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 analyzer.error.error; | 5 library analyzer.error.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/error/listener.dart'; | 9 import 'package:analyzer/error/listener.dart'; |
| 10 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; | 10 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 StrongModeCode.INVALID_CAST_FUNCTION, | 631 StrongModeCode.INVALID_CAST_FUNCTION, |
| 632 StrongModeCode.INVALID_FIELD_OVERRIDE, | 632 StrongModeCode.INVALID_FIELD_OVERRIDE, |
| 633 StrongModeCode.INVALID_METHOD_OVERRIDE, | 633 StrongModeCode.INVALID_METHOD_OVERRIDE, |
| 634 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_BASE, | 634 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_BASE, |
| 635 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN, | 635 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN, |
| 636 StrongModeCode.INVALID_PARAMETER_DECLARATION, | 636 StrongModeCode.INVALID_PARAMETER_DECLARATION, |
| 637 StrongModeCode.INVALID_SUPER_INVOCATION, | 637 StrongModeCode.INVALID_SUPER_INVOCATION, |
| 638 StrongModeCode.NO_DEFAULT_BOUNDS, | 638 StrongModeCode.NO_DEFAULT_BOUNDS, |
| 639 StrongModeCode.NON_GROUND_TYPE_CHECK_INFO, | 639 StrongModeCode.NON_GROUND_TYPE_CHECK_INFO, |
| 640 StrongModeCode.NOT_INSTANTIATED_BOUND, | 640 StrongModeCode.NOT_INSTANTIATED_BOUND, |
| 641 StrongModeCode.TOP_LEVEL_CYCLE, |
| 642 StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_BLOCK, |
| 643 StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_PARAMETER, |
| 644 StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE, |
| 645 StrongModeCode.TOP_LEVEL_INSTANCE_GETTER, |
| 646 StrongModeCode.TOP_LEVEL_TYPE_ARGUMENTS, |
| 647 StrongModeCode.TOP_LEVEL_UNSUPPORTED, |
| 641 StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE, | 648 StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE, |
| 642 TodoCode.TODO, | 649 TodoCode.TODO, |
| 643 ]; | 650 ]; |
| 644 | 651 |
| 645 /** | 652 /** |
| 646 * The lazy initialized map from [ErrorCode.uniqueName] to the [ErrorCode] | 653 * The lazy initialized map from [ErrorCode.uniqueName] to the [ErrorCode] |
| 647 * instance. | 654 * instance. |
| 648 */ | 655 */ |
| 649 HashMap<String, ErrorCode> _uniqueNameToCodeMap; | 656 HashMap<String, ErrorCode> _uniqueNameToCodeMap; |
| 650 | 657 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 * a single list of errors. | 837 * a single list of errors. |
| 831 */ | 838 */ |
| 832 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { | 839 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { |
| 833 Set<AnalysisError> errors = new HashSet<AnalysisError>(); | 840 Set<AnalysisError> errors = new HashSet<AnalysisError>(); |
| 834 for (List<AnalysisError> errorList in errorLists) { | 841 for (List<AnalysisError> errorList in errorLists) { |
| 835 errors.addAll(errorList); | 842 errors.addAll(errorList); |
| 836 } | 843 } |
| 837 return errors.toList(); | 844 return errors.toList(); |
| 838 } | 845 } |
| 839 } | 846 } |
| OLD | NEW |