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

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

Issue 2557513008: Enable messages in asserts by default (Closed)
Patch Set: Created 4 years 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/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/engine.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 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 * See [IMPLEMENTS_DEFERRED_CLASS], and [MIXIN_DEFERRED_CLASS]. 946 * See [IMPLEMENTS_DEFERRED_CLASS], and [MIXIN_DEFERRED_CLASS].
947 */ 947 */
948 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS = 948 static const CompileTimeErrorCode EXTENDS_DEFERRED_CLASS =
949 const CompileTimeErrorCode( 949 const CompileTimeErrorCode(
950 'EXTENDS_DEFERRED_CLASS', 950 'EXTENDS_DEFERRED_CLASS',
951 "This class can't extend the deferred class '{0}'.", 951 "This class can't extend the deferred class '{0}'.",
952 "Try specifying a different superclass, or " 952 "Try specifying a different superclass, or "
953 "removing the extends clause."); 953 "removing the extends clause.");
954 954
955 /** 955 /**
956 * DEP 37 extends the syntax for assert() to allow a second "message"
957 * argument. We issue this error if the user tries to supply a "message"
958 * argument but the DEP is not enabled.
959 */
960 static const CompileTimeErrorCode EXTRA_ARGUMENT_TO_ASSERT =
961 const CompileTimeErrorCode(
962 'EXTRA_ARGUMENT_TO_ASSERT',
963 "Assertions only accept a single argument.",
964 "Try removing the message, or enable messages in assert statements.");
965
966 /**
967 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt; 956 * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt;
968 * h</i> or if <i>m &gt; n</i>. 957 * h</i> or if <i>m &gt; n</i>.
969 * 958 *
970 * 16.12.2 Const: It is a compile-time error if evaluation of a constant 959 * 16.12.2 Const: It is a compile-time error if evaluation of a constant
971 * object results in an uncaught exception being thrown. 960 * object results in an uncaught exception being thrown.
972 * 961 *
973 * Parameters: 962 * Parameters:
974 * 0: the maximum number of positional arguments 963 * 0: the maximum number of positional arguments
975 * 1: the actual number of positional arguments given 964 * 1: the actual number of positional arguments given
976 */ 965 */
(...skipping 3939 matching lines...) Expand 10 before | Expand all | Expand 10 after
4916 * created from the optional [correction] template. 4905 * created from the optional [correction] template.
4917 */ 4906 */
4918 const StrongModeCode(ErrorType type, String name, String message, 4907 const StrongModeCode(ErrorType type, String name, String message,
4919 [String correction]) 4908 [String correction])
4920 : type = type, 4909 : type = type,
4921 super('STRONG_MODE_$name', message, correction); 4910 super('STRONG_MODE_$name', message, correction);
4922 4911
4923 @override 4912 @override
4924 ErrorSeverity get errorSeverity => type.severity; 4913 ErrorSeverity get errorSeverity => type.severity;
4925 } 4914 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698