| 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.src.error.codes; | 5 library analyzer.src.error.codes; |
| 6 | 6 |
| 7 import 'package:analyzer/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
| 8 | 8 |
| 9 export 'package:analyzer/src/analysis_options/error/option_codes.dart'; | 9 export 'package:analyzer/src/analysis_options/error/option_codes.dart'; |
| 10 export 'package:analyzer/src/dart/error/hint_codes.dart'; | 10 export 'package:analyzer/src/dart/error/hint_codes.dart'; |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 * initializing formal is used by a function other than a non-redirecting | 1041 * initializing formal is used by a function other than a non-redirecting |
| 1042 * generative constructor. | 1042 * generative constructor. |
| 1043 */ | 1043 */ |
| 1044 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = | 1044 static const CompileTimeErrorCode FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR = |
| 1045 const CompileTimeErrorCode( | 1045 const CompileTimeErrorCode( |
| 1046 'FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', | 1046 'FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR', |
| 1047 "The redirecting constructor can't have a field initializer.", | 1047 "The redirecting constructor can't have a field initializer.", |
| 1048 "Try using a normal parameter."); | 1048 "Try using a normal parameter."); |
| 1049 | 1049 |
| 1050 /** | 1050 /** |
| 1051 * Temporary error to work around dartbug.com/28515. |
| 1052 * |
| 1053 * We cannot yet properly summarize function-typed parameters with generic |
| 1054 * arguments, so to prevent confusion, we produce an error for any such |
| 1055 * constructs (regardless of whether summaries are in use). |
| 1056 * |
| 1057 * TODO(paulberry): remove this once dartbug.com/28515 is fixed. |
| 1058 */ |
| 1059 static const GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED = |
| 1060 const CompileTimeErrorCode( |
| 1061 'GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED', |
| 1062 "Analysis of generic function typed parameters is not yet supported.", |
| 1063 "Try using an explicit typedef, or changing type parameters to " |
| 1064 "`dynamic`."); |
| 1065 |
| 1066 /** |
| 1051 * 7.2 Getters: It is a compile-time error if a class has both a getter and a | 1067 * 7.2 Getters: It is a compile-time error if a class has both a getter and a |
| 1052 * method with the same name. | 1068 * method with the same name. |
| 1053 * | 1069 * |
| 1054 * Parameters: | 1070 * Parameters: |
| 1055 * 0: the conflicting name of the getter and method | 1071 * 0: the conflicting name of the getter and method |
| 1056 */ | 1072 */ |
| 1057 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = | 1073 static const CompileTimeErrorCode GETTER_AND_METHOD_WITH_SAME_NAME = |
| 1058 const CompileTimeErrorCode( | 1074 const CompileTimeErrorCode( |
| 1059 'GETTER_AND_METHOD_WITH_SAME_NAME', | 1075 'GETTER_AND_METHOD_WITH_SAME_NAME', |
| 1060 "'{0}' can't be used to name a getter, there is already a method " | 1076 "'{0}' can't be used to name a getter, there is already a method " |
| (...skipping 3866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4927 * created from the optional [correction] template. | 4943 * created from the optional [correction] template. |
| 4928 */ | 4944 */ |
| 4929 const StrongModeCode(ErrorType type, String name, String message, | 4945 const StrongModeCode(ErrorType type, String name, String message, |
| 4930 [String correction]) | 4946 [String correction]) |
| 4931 : type = type, | 4947 : type = type, |
| 4932 super('STRONG_MODE_$name', message, correction); | 4948 super('STRONG_MODE_$name', message, correction); |
| 4933 | 4949 |
| 4934 @override | 4950 @override |
| 4935 ErrorSeverity get errorSeverity => type.severity; | 4951 ErrorSeverity get errorSeverity => type.severity; |
| 4936 } | 4952 } |
| OLD | NEW |