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

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

Issue 2023393003: Move constant expression resynthesis into ConstVariableElement mixin. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | 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 77c98634228798b61cace629d2252e1d992693f7..368b9cd95fabfbf763b89b07352dfc0724c6c392 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -2172,12 +2172,8 @@ class _UnitResynthesizer {
TopLevelVariableElementImpl element;
if (unlinkedVariable.initializer?.bodyExpr != null &&
unlinkedVariable.isConst) {
- ConstTopLevelVariableElementImpl constElement =
- new ConstTopLevelVariableElementImpl.forSerialized(
- unlinkedVariable, unit);
- element = constElement;
- constElement.constantInitializer =
- _buildConstExpression(null, unlinkedVariable.initializer.bodyExpr);
+ element = new ConstTopLevelVariableElementImpl.forSerialized(
+ unlinkedVariable, unit);
} else {
element = new TopLevelVariableElementImpl.forSerialized(
unlinkedVariable, unit);
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698