Chromium Code Reviews| Index: pkg/analyzer/lib/src/summary/summarize_const_expr.dart |
| diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart |
| index 771dac90b84f242de15f7f772218944283e3528c..b238fdf6328f4c6d53ff62df599fe837767b576b 100644 |
| --- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart |
| +++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart |
| @@ -93,9 +93,7 @@ abstract class AbstractConstExprSerializer { |
| } else if (expr is PrefixExpression) { |
| _serializePrefixExpression(expr); |
| } else if (expr is PropertyAccess) { |
| - // TODO(scheglov) solve ambiguity of `a.b.length` where `a` and `b` are |
| - // identifiers |
| - if (expr.propertyName.name == 'length') { |
| + if (expr.target is StringLiteral && expr.propertyName.name == 'length') { |
|
Paul Berry
2016/01/27 16:48:59
I think this should be:
if (expr.target is! P
scheglov
2016/01/27 17:55:10
Done.
|
| serialize(expr.target); |
| operations.add(UnlinkedConstOperation.length); |
| } else { |
| @@ -110,6 +108,11 @@ abstract class AbstractConstExprSerializer { |
| } |
| /** |
| + * Return [EntityRefBuilder] that corresponds to the given [constructor]. |
| + */ |
| + EntityRefBuilder serializeConstructorName(ConstructorName constructor); |
| + |
| + /** |
| * Return [EntityRefBuilder] that corresponds to the given [identifier]. |
| */ |
| EntityRefBuilder serializeIdentifier(Identifier identifier); |
| @@ -125,11 +128,6 @@ abstract class AbstractConstExprSerializer { |
| EntityRefBuilder serializeType(TypeName type); |
| /** |
| - * Return [EntityRefBuilder] that corresponds to the given [constructor]. |
| - */ |
| - EntityRefBuilder serializeConstructorName(ConstructorName constructor); |
| - |
| - /** |
| * Return the [UnlinkedConstBuilder] that corresponds to the state of this |
| * serializer. |
| */ |