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

Unified Diff: pkg/analyzer/lib/src/generated/testing/test_type_provider.dart

Issue 1678753002: Summarize constructor initializers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updates for review comments. 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/lib/src/summary/format.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 4bf5cc99f157621bf166556c7a464fbc97ec3ce3..95f6237a533a3df8601d519cd0f8fb9a4e2cbe40 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -194,10 +194,13 @@ class TestTypeProvider implements TypeProvider {
ElementFactory.classElement2("Deprecated");
ConstructorElementImpl constructor = ElementFactory
.constructorElement(deprecatedElement, '', true, [stringType]);
- constructor.constantInitializers = <ConstructorInitializer>[
- AstFactory.constructorFieldInitializer(
- true, 'expires', AstFactory.identifier3('expires'))
- ];
+ (constructor.parameters[0] as ParameterElementImpl).name = 'expires';
+ ConstructorFieldInitializer expiresInit =
+ AstFactory.constructorFieldInitializer(
+ true, 'expires', AstFactory.identifier3('expires'));
+ (expiresInit.expression as SimpleIdentifier).staticElement =
+ constructor.parameters[0];
+ constructor.constantInitializers = <ConstructorInitializer>[expiresInit];
deprecatedElement.constructors = <ConstructorElement>[constructor];
_deprecatedType = deprecatedElement.type;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698