Chromium Code Reviews| 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 71d0f4c2bc9eeff0a9e2f39181c77c8684958335..1a8f3b01eebe1ff02f58eedd976606165c4c20af 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 |
| @@ -581,15 +581,18 @@ public class ConstantVisitor extends UnifyingAstVisitor<EvaluationResultImpl> { |
| * @return |
| */ |
| private boolean isStringLength(Element element) { |
| - if (!(element instanceof PropertyAccessorElement)) { |
| - return false; |
| - } |
| - PropertyAccessorElement accessor = (PropertyAccessorElement) element; |
| - if (!accessor.isGetter() || !accessor.getName().equals("length")) { |
| - return false; |
| - } |
| - Element parent = accessor.getEnclosingElement(); |
| - return parent.equals(typeProvider.getStringType().getElement()); |
| + // TODO(brianwilkerson) Replace the line below with the commented out code when the new constant |
|
Paul Berry
2014/09/22 19:31:01
I see what you're doing here, but it seems a littl
Brian Wilkerson
2014/09/22 19:48:18
I don't feel strongly, so I changed it. Now we hav
|
| + // support can be added. |
| + return false; |
| +// if (!(element instanceof PropertyAccessorElement)) { |
| +// return false; |
| +// } |
| +// PropertyAccessorElement accessor = (PropertyAccessorElement) element; |
| +// if (!accessor.isGetter() || !accessor.getName().equals("length")) { |
| +// return false; |
| +// } |
| +// Element parent = accessor.getEnclosingElement(); |
| +// return parent.equals(typeProvider.getStringType().getElement()); |
| } |
| /** |