| 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.
|
| *
|
|
|