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

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

Issue 2033293003: Compute ConstructorElement.returnType/type dynamically. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/static_type_analyzer_test.dart
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 0e0e3a1005e8dd9393cdf02cae66c27400c00ddf..a8f91050804257832491a420ba8a237d773f04c3 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -990,9 +990,6 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
String constructorName = "m";
ConstructorElementImpl constructor =
ElementFactory.constructorElement2(classElement, constructorName);
- constructor.returnType = classElement.type;
- FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
- constructor.type = constructorType;
classElement.constructors = <ConstructorElement>[constructor];
InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
null,
@@ -1010,9 +1007,6 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
ConstructorElementImpl constructor =
ElementFactory.constructorElement2(elementC, null);
elementC.constructors = <ConstructorElement>[constructor];
- constructor.returnType = elementC.type;
- FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
- constructor.type = constructorType;
TypeName typeName =
AstFactory.typeName(elementC, [AstFactory.typeName(elementI)]);
typeName.type = elementC.type.instantiate(<DartType>[elementI.type]);
@@ -1031,9 +1025,6 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
ClassElementImpl classElement = ElementFactory.classElement2("C");
ConstructorElementImpl constructor =
ElementFactory.constructorElement2(classElement, null);
- constructor.returnType = classElement.type;
- FunctionTypeImpl constructorType = new FunctionTypeImpl(constructor);
- constructor.type = constructorType;
classElement.constructors = <ConstructorElement>[constructor];
InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
null, AstFactory.typeName(classElement));

Powered by Google App Engine
This is Rietveld 408576698