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

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

Issue 2013883003: Migrate UnlinkedVariable.constExpr to UnlinkedExecutable.bodyExpr. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix a comment 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/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 4f6acded7bac2e9a41de889284df9e4263579f6f..ef542674933fa461173d228465bb07a6a403757f 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -1630,7 +1630,7 @@ class ConstVariableNode extends ConstNode {
List<ConstNode> dependencies = <ConstNode>[];
collectDependencies(
dependencies,
- variableElement.unlinkedVariable.constExpr,
+ variableElement.unlinkedVariable.initializer?.bodyExpr,
variableElement.compilationUnit);
return dependencies;
}
@@ -1993,7 +1993,7 @@ class ExprTypeComputer {
library = unit.enclosingElement;
linker = library._linker;
typeProvider = linker.typeProvider;
- unlinkedConst = variableElement.unlinkedVariable.constExpr;
+ unlinkedConst = variableElement.unlinkedVariable.initializer?.bodyExpr;
}
DartType compute() {
@@ -4388,7 +4388,7 @@ class TypeInferenceNode extends Node<TypeInferenceNode> {
List<TypeInferenceNode> dependencies = <TypeInferenceNode>[];
collectDependencies(
dependencies,
- variableElement.unlinkedVariable.constExpr,
+ variableElement.unlinkedVariable.initializer?.bodyExpr,
variableElement.compilationUnit);
return dependencies;
}
@@ -4602,7 +4602,8 @@ abstract class VariableElementForLink
final CompilationUnitElementForLink compilationUnit;
VariableElementForLink(this.unlinkedVariable, this.compilationUnit) {
- if (compilationUnit.isInBuildUnit && unlinkedVariable.constExpr != null) {
+ if (compilationUnit.isInBuildUnit &&
+ unlinkedVariable.initializer?.bodyExpr != null) {
_constNode = new ConstVariableNode(this);
if (unlinkedVariable.type == null) {
_typeInferenceNode = new TypeInferenceNode(this);
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698