| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
|
| index efea9d7657c410e5098a2d18fea2ace0ebdb4ad5..526beada2b7bf69d2f5bd22fc0f60acc498e5a42 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/constant/ConstantVisitor.java
|
| @@ -300,19 +300,19 @@ public class ConstantVisitor extends UnifyingAstVisitor<EvaluationResultImpl> {
|
| // TODO(paulberry): if the constructor is one of {bool,int,String}.fromEnvironment(),
|
| // we may be able to infer the value based on -D flags provided to the analyzer (see
|
| // dartbug.com/17234).
|
| - return error(node, null);
|
| + return validWithUnknownValue(definingClass);
|
| }
|
| if (!redirectedConstructor.isConst()) {
|
| // Delegating to a non-const constructor--this is not allowed (and
|
| // is checked elsewhere--see [ErrorVerifier.checkForRedirectToNonConstConstructor()]).
|
| - // So if we encounter it just error out.
|
| - return error(node, null);
|
| + // So if we encounter it just consider it an unknown value to suppress further errors.
|
| + return validWithUnknownValue(definingClass);
|
| }
|
| if (constructorsVisited.contains(redirectedConstructor)) {
|
| // Cycle in redirecting factory constructors--this is not allowed
|
| // and is checked elsewhere--see [ErrorVerifier.checkForRecursiveFactoryRedirect()]).
|
| - // So if we encounter it just error out.
|
| - return error(node, null);
|
| + // So if we encounter it just consider it an unknown value to suppress further errors.
|
| + return validWithUnknownValue(definingClass);
|
| }
|
| constructor = redirectedConstructor;
|
| definingClass = (InterfaceType) constructor.getReturnType();
|
|
|