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 30 matching lines...) Expand all Loading... |
41 // error code in on the line following the pattern we're grepping for. Those | 41 // error code in on the line following the pattern we're grepping for. Those |
42 // need to be filled in by hand. | 42 // need to be filled in by hand. |
43 // | 43 // |
44 AnalysisOptionsErrorCode.PARSE_ERROR, | 44 AnalysisOptionsErrorCode.PARSE_ERROR, |
45 AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE, | 45 AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE, |
46 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE, | 46 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE, |
47 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES, | 47 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES, |
48 AnalysisOptionsWarningCode.UNSUPPORTED_VALUE, | 48 AnalysisOptionsWarningCode.UNSUPPORTED_VALUE, |
49 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH, | 49 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH, |
50 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, | 50 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, |
| 51 CheckedModeCompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, |
51 CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, | 52 CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, |
52 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, | 53 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, |
53 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, | 54 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, |
54 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, | 55 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, |
55 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, | 56 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, |
56 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, | 57 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, |
57 CompileTimeErrorCode.AMBIGUOUS_EXPORT, | 58 CompileTimeErrorCode.AMBIGUOUS_EXPORT, |
58 CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, | 59 CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS, |
59 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | 60 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, |
60 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, | 61 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 * a single list of errors. | 842 * a single list of errors. |
842 */ | 843 */ |
843 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { | 844 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { |
844 Set<AnalysisError> errors = new HashSet<AnalysisError>(); | 845 Set<AnalysisError> errors = new HashSet<AnalysisError>(); |
845 for (List<AnalysisError> errorList in errorLists) { | 846 for (List<AnalysisError> errorList in errorLists) { |
846 errors.addAll(errorList); | 847 errors.addAll(errorList); |
847 } | 848 } |
848 return errors.toList(); | 849 return errors.toList(); |
849 } | 850 } |
850 } | 851 } |
OLD | NEW |