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

Unified Diff: pkg/analyzer/lib/options.dart

Issue 633803002: Check parameter types when evaluating constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/options.dart
diff --git a/pkg/analyzer/lib/options.dart b/pkg/analyzer/lib/options.dart
index e7919ff191df4fdbe11e551da957b4031e48a033..f6e51e75c43b283c1ed4f34c8ce52878c3190f87 100644
--- a/pkg/analyzer/lib/options.dart
+++ b/pkg/analyzer/lib/options.dart
@@ -32,6 +32,12 @@ class CommandLineOptions {
/** Whether to enable support for the proposed enum feature. */
final bool enableEnum;
+ /**
+ * Whether to treat type mismatches found during constant evaluation as
+ * errors.
+ */
+ final bool enableTypeChecks;
+
/** Whether to ignore unrecognized flags */
final bool ignoreUnrecognizedFlags;
@@ -75,6 +81,7 @@ class CommandLineOptions {
displayVersion = args['version'],
enableAsync = args['enable-async'],
enableEnum = args['enable-enum'],
+ enableTypeChecks = args['enable_type_checks'],
ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'],
log = args['log'],
machineFormat = args['machine'] || args['format'] == 'machine',
@@ -161,6 +168,9 @@ class CommandLineOptions {
defaultsTo: false, negatable: false, hide: true)
..addFlag('warm-perf',
help: 'Show both cold and warm performance statistics',
+ defaultsTo: false, negatable: false, hide: true)
+ ..addFlag('enable_type_checks',
+ help: 'Check types in constant evaluation',
defaultsTo: false, negatable: false, hide: true);
try {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | pkg/analyzer/lib/src/generated/constant.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698