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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, | 52 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, |
53 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, | 53 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, |
54 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, | 54 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, |
55 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, | 55 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, |
56 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, | 56 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, |
57 CompileTimeErrorCode.AMBIGUOUS_EXPORT, | 57 CompileTimeErrorCode.AMBIGUOUS_EXPORT, |
58 CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, | 58 CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, |
59 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 59 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
60 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, | 60 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, |
61 CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, | 61 CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, |
| 62 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME, |
62 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, | 63 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, |
63 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | 64 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, |
64 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | 65 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, |
65 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, | 66 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, |
66 CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | 67 CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, |
67 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, | 68 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, |
68 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, | 69 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, |
69 CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, | 70 CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, |
70 CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, | 71 CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, |
71 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, | 72 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 * a single list of errors. | 826 * a single list of errors. |
826 */ | 827 */ |
827 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { | 828 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { |
828 Set<AnalysisError> errors = new HashSet<AnalysisError>(); | 829 Set<AnalysisError> errors = new HashSet<AnalysisError>(); |
829 for (List<AnalysisError> errorList in errorLists) { | 830 for (List<AnalysisError> errorList in errorLists) { |
830 errors.addAll(errorList); | 831 errors.addAll(errorList); |
831 } | 832 } |
832 return errors.toList(); | 833 return errors.toList(); |
833 } | 834 } |
834 } | 835 } |
OLD | NEW |