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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.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.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
index 0721adae3f49cea2102b8fd782ef1d1cac940b27..826e7107933967ee1ae73ca0136cca160630ad8f 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/context/AnalysisOptionsImpl.java
@@ -94,6 +94,12 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
private boolean hint = true;
/**
+ * A flag indicating whether analysis should treat type mismatches found during constant
+ * evaluation as errors.
+ */
+ private boolean enableTypeChecks = false;
+
+ /**
* A flag indicating whether incremental analysis should be used.
*/
private boolean incremental = false;
@@ -124,6 +130,7 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
enableAsync = options.getEnableAsync();
enableDeferredLoading = options.getEnableDeferredLoading();
enableEnum = options.getEnableEnum();
+ enableTypeChecks = options.getEnableTypeChecks();
generateSdkErrors = options.getGenerateSdkErrors();
hint = options.getHint();
incremental = options.getIncremental();
@@ -171,6 +178,11 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
}
@Override
+ public boolean getEnableTypeChecks() {
+ return enableTypeChecks;
+ }
+
+ @Override
public boolean getGenerateSdkErrors() {
return generateSdkErrors;
}
@@ -265,6 +277,13 @@ public class AnalysisOptionsImpl implements AnalysisOptions {
}
/**
+ * Set whether analysis should treat type mismatches found during constant evaluation as errors.
+ */
+ public void setEnableTypeChecks(boolean enableTypeChecks) {
+ this.enableTypeChecks = enableTypeChecks;
+ }
+
+ /**
* Set whether errors, warnings and hints should be generated for sources in the SDK to match the
* given value.
*

Powered by Google App Engine
This is Rietveld 408576698