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

Unified Diff: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerOptions.java

Issue 610863004: Start implementing checked mode compile time errors in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes based on review comments and in-person discussion Created 6 years, 3 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: 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..cf3a0e8ff651ad287ee87097b1ab0b272c2905e3 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")
+ // usage = "Check types in constant evaluation") // don't show in help
+ 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;
}

Powered by Google App Engine
This is Rietveld 408576698