Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: pkg/analyzer/lib/src/error/codes.dart

Issue 2716453006: Add error for mixins defining conflicting private names (issue 28809) (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after
2039 */ 2039 */
2040 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT = 2040 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT =
2041 const CompileTimeErrorCode( 2041 const CompileTimeErrorCode(
2042 'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', 2042 'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT',
2043 "The name '{0}' refers to an import prefix, so it must be followed " 2043 "The name '{0}' refers to an import prefix, so it must be followed "
2044 "by '.'.", 2044 "by '.'.",
2045 "Try correcting the name to refer to something other than a prefix, or " 2045 "Try correcting the name to refer to something other than a prefix, or "
2046 "renaming the prefix."); 2046 "renaming the prefix.");
2047 2047
2048 /** 2048 /**
2049 * It is an error for a mixin to add a private name that conflicts with a
scheglov 2017/02/24 23:03:51 ...?
Brian Wilkerson 2017/02/24 23:07:20 Thought completed.
2050 */
2051 static const CompileTimeErrorCode PRIVATE_COLLISION_IN_MIXIN_APPLICATION =
2052 const CompileTimeErrorCode(
2053 'PRIVATE_COLLISION_IN_MIXIN_APPLICATION',
2054 "The private name {0}, defined by {1}, conflicts with the same name "
2055 "defined by {2}.",
2056 "Try removing {1} from the 'with' clause.");
2057
2058 /**
2049 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named 2059 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named
2050 * optional parameter begins with an '_' character. 2060 * optional parameter begins with an '_' character.
2051 */ 2061 */
2052 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = 2062 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER =
2053 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', 2063 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER',
2054 "Named optional parameters can't start with an underscore."); 2064 "Named optional parameters can't start with an underscore.");
2055 2065
2056 /** 2066 /**
2057 * 12.1 Constants: It is a compile-time error if the value of a compile-time 2067 * 12.1 Constants: It is a compile-time error if the value of a compile-time
2058 * constant expression depends on itself. 2068 * constant expression depends on itself.
(...skipping 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after
4943 * created from the optional [correction] template. 4953 * created from the optional [correction] template.
4944 */ 4954 */
4945 const StrongModeCode(ErrorType type, String name, String message, 4955 const StrongModeCode(ErrorType type, String name, String message,
4946 [String correction]) 4956 [String correction])
4947 : type = type, 4957 : type = type,
4948 super('STRONG_MODE_$name', message, correction); 4958 super('STRONG_MODE_$name', message, correction);
4949 4959
4950 @override 4960 @override
4951 ErrorSeverity get errorSeverity => type.severity; 4961 ErrorSeverity get errorSeverity => type.severity;
4952 } 4962 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698