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

Unified Diff: pkg/analyzer/lib/src/generated/engine.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/error/codes.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 386053315d12f47db5115f65f0f69e80b5917418..272a660f6ff45a6836bca30ab5cdd34a9eac0859 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1105,6 +1105,7 @@ abstract class AnalysisOptions {
/**
* Return `true` to enable custom assert messages (DEP 37).
*/
+ @deprecated
bool get enableAssertMessage;
/**
@@ -1303,12 +1304,11 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@deprecated
static const int DEFAULT_CACHE_SIZE = 64;
- static const int ENABLE_ASSERT_FLAG = 0x01;
- static const int ENABLE_LAZY_ASSIGNMENT_OPERATORS = 0x02;
- static const int ENABLE_STRICT_CALL_CHECKS_FLAG = 0x04;
- static const int ENABLE_STRONG_MODE_FLAG = 0x08;
- static const int ENABLE_STRONG_MODE_HINTS_FLAG = 0x10;
- static const int ENABLE_SUPER_MIXINS_FLAG = 0x20;
+ static const int ENABLE_LAZY_ASSIGNMENT_OPERATORS = 0x01;
+ static const int ENABLE_STRICT_CALL_CHECKS_FLAG = 0x02;
+ static const int ENABLE_STRONG_MODE_FLAG = 0x04;
+ static const int ENABLE_STRONG_MODE_HINTS_FLAG = 0x08;
+ static const int ENABLE_SUPER_MIXINS_FLAG = 0x10;
/**
* The default list of non-nullable type names.
@@ -1333,9 +1333,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
bool enableAssertInitializer = false;
@override
- bool enableAssertMessage = false;
-
- @override
bool enableLazyAssignmentOperators = false;
@override
@@ -1454,7 +1451,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate;
dart2jsHint = options.dart2jsHint;
enableAssertInitializer = options.enableAssertInitializer;
- enableAssertMessage = options.enableAssertMessage;
enableStrictCallChecks = options.enableStrictCallChecks;
enableLazyAssignmentOperators = options.enableLazyAssignmentOperators;
enableSuperMixins = options.enableSuperMixins;
@@ -1513,6 +1509,13 @@ class AnalysisOptionsImpl implements AnalysisOptions {
_analyzeFunctionBodiesPredicate = value;
}
+ @override
+ @deprecated
+ bool get enableAssertMessage => true;
+
+ @deprecated
+ void set enableAssertMessage(bool enable) {}
+
@deprecated
@override
bool get enableAsync => true;
@@ -1578,12 +1581,12 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@override
List<int> encodeCrossContextOptions() {
- int flags = (enableAssertMessage ? ENABLE_ASSERT_FLAG : 0) |
+ int flags =
(enableLazyAssignmentOperators ? ENABLE_LAZY_ASSIGNMENT_OPERATORS : 0) |
- (enableStrictCallChecks ? ENABLE_STRICT_CALL_CHECKS_FLAG : 0) |
- (enableSuperMixins ? ENABLE_SUPER_MIXINS_FLAG : 0) |
- (strongMode ? ENABLE_STRONG_MODE_FLAG : 0) |
- (strongModeHints ? ENABLE_STRONG_MODE_HINTS_FLAG : 0);
+ (enableStrictCallChecks ? ENABLE_STRICT_CALL_CHECKS_FLAG : 0) |
+ (enableSuperMixins ? ENABLE_SUPER_MIXINS_FLAG : 0) |
+ (strongMode ? ENABLE_STRONG_MODE_FLAG : 0) |
+ (strongModeHints ? ENABLE_STRONG_MODE_HINTS_FLAG : 0);
return <int>[flags, patchPlatform];
}
@@ -1592,7 +1595,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
dart2jsHint = false;
disableCacheFlushing = false;
enableAssertInitializer = false;
- enableAssertMessage = false;
enableLazyAssignmentOperators = false;
enableStrictCallChecks = false;
enableSuperMixins = false;
@@ -1621,7 +1623,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@override
void setCrossContextOptionsFrom(AnalysisOptions options) {
- enableAssertMessage = options.enableAssertMessage;
enableLazyAssignmentOperators = options.enableLazyAssignmentOperators;
enableStrictCallChecks = options.enableStrictCallChecks;
enableSuperMixins = options.enableSuperMixins;
@@ -1640,9 +1641,6 @@ class AnalysisOptionsImpl implements AnalysisOptions {
static String decodeCrossContextOptions(List<int> encoding) {
List<String> parts = [];
int flags = encoding[0];
- if (flags & ENABLE_ASSERT_FLAG > 0) {
- parts.add('assert');
- }
if (flags & ENABLE_LAZY_ASSIGNMENT_OPERATORS > 0) {
parts.add('lazyAssignmentOperators');
}
« no previous file with comments | « pkg/analyzer/lib/src/error/codes.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