Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1797)

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1681513003: Resynthesize invalid constants as unresolved identifiers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53689173f3b7e1f453b4ffa0ad7acb329b5c715e..085136b6d95bd4041a3976cac80a744b476c025f 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -262,7 +262,9 @@ class _ConstExprBuilder {
Expression get expr => stack.single;
Expression build() {
- // TODO(scheglov) complete implementation
+ if (uc.isInvalid) {
+ return AstFactory.identifier3(r'$$invalidConstExpr$$');
+ }
for (UnlinkedConstOperation operation in uc.operations) {
switch (operation) {
case UnlinkedConstOperation.pushNull:
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698