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

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 1050203002: Begin making copies of AST nodes for constants during resolution. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments and switch to using mixins. Created 5 years, 9 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
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index e18958753182df55b8560633d5698382e09c03d5..a45e0121e83a7b40eb6b12a57e4a5614320b3502 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -931,10 +931,11 @@ class ConstantFinderTest extends EngineTestCase {
return constructorInvocations;
}
- Map<VariableElement, VariableDeclaration> _findVariableDeclarations() {
+ Map<PotentiallyConstVariableElement, VariableDeclaration> _findVariableDeclarations() {
ConstantFinder finder = new ConstantFinder();
_node.accept(finder);
- Map<VariableElement, VariableDeclaration> variableMap = finder.variableMap;
+ Map<PotentiallyConstVariableElement, VariableDeclaration> variableMap =
+ finder.variableMap;
expect(variableMap, isNotNull);
return variableMap;
}
@@ -7848,7 +7849,7 @@ class MockDartSdk implements DartSdk {
@reflectiveTest
class ReferenceFinderTest extends EngineTestCase {
DirectedGraph<AstNode> _referenceGraph;
- Map<VariableElement, VariableDeclaration> _variableDeclarationMap;
+ Map<PotentiallyConstVariableElement, VariableDeclaration> _variableDeclarationMap;
Map<ConstructorElement, ConstructorDeclaration> _constructorDeclarationMap;
VariableDeclaration _head;
AstNode _tail;
@@ -7856,7 +7857,7 @@ class ReferenceFinderTest extends EngineTestCase {
void setUp() {
_referenceGraph = new DirectedGraph<AstNode>();
_variableDeclarationMap =
- new HashMap<VariableElement, VariableDeclaration>();
+ new HashMap<PotentiallyConstVariableElement, VariableDeclaration>();
_constructorDeclarationMap =
new HashMap<ConstructorElement, ConstructorDeclaration>();
_head = AstFactory.variableDeclaration("v1");
@@ -7979,8 +7980,8 @@ class ReferenceFinderTest extends EngineTestCase {
VariableDeclaration variableDeclaration =
AstFactory.variableDeclaration(name);
_tail = variableDeclaration;
- VariableElementImpl variableElement =
- ElementFactory.localVariableElement2(name);
+ ConstLocalVariableElementImpl variableElement =
+ ElementFactory.constLocalVariableElement(name);
variableElement.const3 = isConst;
AstFactory.variableDeclarationList2(
isConst ? Keyword.CONST : Keyword.VAR, [variableDeclaration]);

Powered by Google App Engine
This is Rietveld 408576698