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 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2053 */ | 2053 */ |
2054 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT = | 2054 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT = |
2055 const CompileTimeErrorCode( | 2055 const CompileTimeErrorCode( |
2056 'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', | 2056 'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', |
2057 "The name '{0}' refers to an import prefix, so it must be followed " | 2057 "The name '{0}' refers to an import prefix, so it must be followed " |
2058 "by '.'.", | 2058 "by '.'.", |
2059 "Try correcting the name to refer to something other than a prefix, or
" | 2059 "Try correcting the name to refer to something other than a prefix, or
" |
2060 "renaming the prefix."); | 2060 "renaming the prefix."); |
2061 | 2061 |
2062 /** | 2062 /** |
| 2063 * It is an error for a mixin to add a private name that conflicts with a |
| 2064 * private name added by a superclass or another mixin. |
| 2065 */ |
| 2066 static const CompileTimeErrorCode PRIVATE_COLLISION_IN_MIXIN_APPLICATION = |
| 2067 const CompileTimeErrorCode( |
| 2068 'PRIVATE_COLLISION_IN_MIXIN_APPLICATION', |
| 2069 "The private name {0}, defined by {1}, conflicts with the same name " |
| 2070 "defined by {2}.", |
| 2071 "Try removing {1} from the 'with' clause."); |
| 2072 |
| 2073 /** |
2063 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named | 2074 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named |
2064 * optional parameter begins with an '_' character. | 2075 * optional parameter begins with an '_' character. |
2065 */ | 2076 */ |
2066 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = | 2077 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = |
2067 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', | 2078 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', |
2068 "Named optional parameters can't start with an underscore."); | 2079 "Named optional parameters can't start with an underscore."); |
2069 | 2080 |
2070 /** | 2081 /** |
2071 * 12.1 Constants: It is a compile-time error if the value of a compile-time | 2082 * 12.1 Constants: It is a compile-time error if the value of a compile-time |
2072 * constant expression depends on itself. | 2083 * constant expression depends on itself. |
(...skipping 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4957 * created from the optional [correction] template. | 4968 * created from the optional [correction] template. |
4958 */ | 4969 */ |
4959 const StrongModeCode(ErrorType type, String name, String message, | 4970 const StrongModeCode(ErrorType type, String name, String message, |
4960 [String correction]) | 4971 [String correction]) |
4961 : type = type, | 4972 : type = type, |
4962 super('STRONG_MODE_$name', message, correction); | 4973 super('STRONG_MODE_$name', message, correction); |
4963 | 4974 |
4964 @override | 4975 @override |
4965 ErrorSeverity get errorSeverity => type.severity; | 4976 ErrorSeverity get errorSeverity => type.severity; |
4966 } | 4977 } |
OLD | NEW |