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/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
10 import 'package:analyzer/error/listener.dart'; | 10 import 'package:analyzer/error/listener.dart'; |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 StrongModeCode.IMPLICIT_DYNAMIC_MAP_LITERAL, | 862 StrongModeCode.IMPLICIT_DYNAMIC_MAP_LITERAL, |
863 StrongModeCode.IMPLICIT_DYNAMIC_METHOD, | 863 StrongModeCode.IMPLICIT_DYNAMIC_METHOD, |
864 StrongModeCode.IMPLICIT_DYNAMIC_PARAMETER, | 864 StrongModeCode.IMPLICIT_DYNAMIC_PARAMETER, |
865 StrongModeCode.IMPLICIT_DYNAMIC_RETURN, | 865 StrongModeCode.IMPLICIT_DYNAMIC_RETURN, |
866 StrongModeCode.IMPLICIT_DYNAMIC_TYPE, | 866 StrongModeCode.IMPLICIT_DYNAMIC_TYPE, |
867 StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE, | 867 StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE, |
868 StrongModeCode.INFERRED_TYPE, | 868 StrongModeCode.INFERRED_TYPE, |
869 StrongModeCode.INFERRED_TYPE_ALLOCATION, | 869 StrongModeCode.INFERRED_TYPE_ALLOCATION, |
870 StrongModeCode.INFERRED_TYPE_CLOSURE, | 870 StrongModeCode.INFERRED_TYPE_CLOSURE, |
871 StrongModeCode.INFERRED_TYPE_LITERAL, | 871 StrongModeCode.INFERRED_TYPE_LITERAL, |
| 872 StrongModeCode.INVALID_CAST_LITERAL, |
| 873 StrongModeCode.INVALID_CAST_LITERAL_LIST, |
| 874 StrongModeCode.INVALID_CAST_LITERAL_MAP, |
| 875 StrongModeCode.INVALID_CAST_FUNCTION_EXPR, |
| 876 StrongModeCode.INVALID_CAST_NEW_EXPR, |
| 877 StrongModeCode.INVALID_CAST_METHOD, |
| 878 StrongModeCode.INVALID_CAST_FUNCTION, |
872 StrongModeCode.INVALID_FIELD_OVERRIDE, | 879 StrongModeCode.INVALID_FIELD_OVERRIDE, |
873 StrongModeCode.INVALID_METHOD_OVERRIDE, | 880 StrongModeCode.INVALID_METHOD_OVERRIDE, |
874 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_BASE, | 881 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_BASE, |
875 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN, | 882 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN, |
876 StrongModeCode.INVALID_PARAMETER_DECLARATION, | 883 StrongModeCode.INVALID_PARAMETER_DECLARATION, |
877 StrongModeCode.INVALID_SUPER_INVOCATION, | 884 StrongModeCode.INVALID_SUPER_INVOCATION, |
878 StrongModeCode.NON_GROUND_TYPE_CHECK_INFO, | 885 StrongModeCode.NON_GROUND_TYPE_CHECK_INFO, |
879 StrongModeCode.STATIC_TYPE_ERROR, | |
880 StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE, | 886 StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE, |
881 TodoCode.TODO, | 887 TodoCode.TODO, |
882 ]; | 888 ]; |
883 | 889 |
884 /** | 890 /** |
885 * The lazy initialized map from [uniqueName] to the [ErrorCode] instance. | 891 * The lazy initialized map from [uniqueName] to the [ErrorCode] instance. |
886 */ | 892 */ |
887 static HashMap<String, ErrorCode> _uniqueNameToCodeMap; | 893 static HashMap<String, ErrorCode> _uniqueNameToCodeMap; |
888 | 894 |
889 /** | 895 /** |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 | 1176 |
1171 @override | 1177 @override |
1172 int get hashCode => ordinal; | 1178 int get hashCode => ordinal; |
1173 | 1179 |
1174 @override | 1180 @override |
1175 int compareTo(ErrorType other) => ordinal - other.ordinal; | 1181 int compareTo(ErrorType other) => ordinal - other.ordinal; |
1176 | 1182 |
1177 @override | 1183 @override |
1178 String toString() => name; | 1184 String toString() => name; |
1179 } | 1185 } |
OLD | NEW |