| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/DartObjectImpl.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/DartObjectImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/DartObjectImpl.java
|
| index 7138576ce442331ca6f63de09feec9feb3409619..778fd9a0708c4ef01a52860d8db07b5190a6c4bf 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/DartObjectImpl.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/object/DartObjectImpl.java
|
| @@ -64,6 +64,8 @@ public class DartObjectImpl implements DartObject {
|
| return new DartObjectImpl(typeProvider.getDoubleType(), result);
|
| } else if (result instanceof NumState) {
|
| return new DartObjectImpl(typeProvider.getNumType(), result);
|
| + } else if (result instanceof StringState) {
|
| + return new DartObjectImpl(typeProvider.getStringType(), result);
|
| }
|
| // We should never get here.
|
| throw new IllegalStateException("add returned a " + result.getClass().getName());
|
| @@ -536,6 +538,17 @@ public class DartObjectImpl implements DartObject {
|
| }
|
|
|
| /**
|
| + * Return the result of invoking the 'length' getter on this object.
|
| + *
|
| + * @param typeProvider the type provider used to find known types
|
| + * @return the result of invoking the 'length' getter on this object
|
| + * @throws EvaluationException if the operator is not appropriate for an object of this kind
|
| + */
|
| + public DartObjectImpl stringLength(TypeProvider typeProvider) throws EvaluationException {
|
| + return new DartObjectImpl(typeProvider.getIntType(), state.stringLength());
|
| + }
|
| +
|
| + /**
|
| * Return the result of invoking the '*' operator on this object with the given argument.
|
| *
|
| * @param typeProvider the type provider used to find known types
|
|
|