| 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 4fdd54e4abe956dd1f078f315ca8b8522698c096..891300e27ede08d486603db82654905a0029b383 100644
|
| --- a/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| +++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| @@ -286,6 +286,9 @@ 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:
|
| @@ -459,7 +462,8 @@ class _ConstExprBuilder {
|
| case UnlinkedConstOperation.typeCast:
|
| case UnlinkedConstOperation.typeCheck:
|
| case UnlinkedConstOperation.throwException:
|
| - return AstFactory.identifier3(r'$notConst$');
|
| + throw new UnimplementedError(
|
| + 'Unexpected $operation in a constant expression.');
|
| }
|
| }
|
| return stack.single;
|
|
|