Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java |
| diff --git a/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java b/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java |
| index 8c0dfcf1276b143ff79cc37b1894851a1448a09f..5726bfc0efe38b996566e1b4cf05eb5a63e8abec 100644 |
| --- a/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java |
| +++ b/editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java |
| @@ -189,6 +189,10 @@ public class AnalyzerOptions { |
| usage = "Do not show hint results") |
| private boolean disableHints = false; |
| + @Option(name = "--enable_type_checks",// |
|
jwren
2014/09/29 16:42:45
feels like "constant" keyword is missing... enable
Paul Berry
2014/09/29 17:42:23
Unfortunately, the name of this option is dictated
|
| + usage = "Check types in constant evaluation") |
|
Paul Berry
2014/09/29 17:42:23
During an in-person conversation, Brian brought up
|
| + private boolean enableTypeChecks = false; |
| + |
| @Option(name = "--perf",// |
| usage = "Print performance statistics") |
| private boolean perf = false; |
| @@ -236,6 +240,14 @@ public class AnalyzerOptions { |
| return enableEnum; |
| } |
| + /** |
| + * Return {@code true} if analysis should treat type mismatches found during constant evaluation |
| + * as errors. |
| + */ |
| + public boolean getEnableTypeChecks() { |
| + return enableTypeChecks; |
| + } |
| + |
| public boolean getMachineFormat() { |
| return machineFormat || outputFormat == AnalyzerOutputFormat.MACHINE; |
| } |