| Index: pkg/analyzer/lib/src/summary/resynthesize.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| index 23fecd5a870969b0679f97d818123bcc2434c8e7..159b3316372f730190d466a7ca7b433647c998b3 100644
|
| --- a/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| +++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| @@ -286,9 +286,6 @@ class _ConstExprBuilder {
|
| Expression get expr => stack.single;
|
|
|
| Expression build() {
|
| - if (!uc.isValidConst) {
|
| - return AstFactory.identifier3(r'$$invalidConstExpr$$');
|
| - }
|
| for (UnlinkedConstOperation operation in uc.operations) {
|
| switch (operation) {
|
| case UnlinkedConstOperation.pushNull:
|
| @@ -564,12 +561,12 @@ class _ConstExprBuilder {
|
| void _pushExtractProperty() {
|
| Expression target = _pop();
|
| String name = uc.strings[stringPtr++];
|
| - // TODO(scheglov) Only String.length property access is supported.
|
| - assert(name == 'length');
|
| - _push(AstFactory.propertyAccess(
|
| - target,
|
| - AstFactory.identifier3('length')
|
| - ..staticElement = _getStringLengthElement()));
|
| + SimpleIdentifier propertyNode = AstFactory.identifier3(name);
|
| + // Only String.length property access can be potentially resolved.
|
| + if (name == 'length') {
|
| + propertyNode.staticElement = _getStringLengthElement();
|
| + }
|
| + _push(AstFactory.propertyAccess(target, propertyNode));
|
| }
|
|
|
| void _pushInstanceCreation() {
|
|
|