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

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

Issue 1420053011: Introduce code to generate summaries from an element model. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove more unnecessary TODOs. Created 5 years, 1 month 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/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 5b5204a3d752f8acde2fc57558a13ab4179b9f3c..85cc8902810d68551e58b4cb2ad1dec7a83c7d22 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -208,7 +208,10 @@ class TestTypeProvider implements TypeProvider {
@override
InterfaceType get functionType {
if (_functionType == null) {
- _functionType = ElementFactory.classElement2("Function").type;
+ ClassElementImpl functionClassElement =
+ ElementFactory.classElement2("Function");
+ _functionType = functionClassElement.type;
+ functionClassElement.constructors = <ConstructorElement>[];
Brian Wilkerson 2015/11/11 15:26:10 I'm surprised that this is necessary. I thought we
Paul Berry 2015/11/11 19:12:22 What we currently do is: in the constructor for Cl
}
return _functionType;
}
@@ -396,7 +399,10 @@ class TestTypeProvider implements TypeProvider {
@override
InterfaceType get stackTraceType {
if (_stackTraceType == null) {
- _stackTraceType = ElementFactory.classElement2("StackTrace").type;
+ ClassElementImpl stackTraceClassElement =
+ ElementFactory.classElement2("StackTrace");
+ _stackTraceType = stackTraceClassElement.type;
+ stackTraceClassElement.constructors = <ConstructorElement>[];
}
return _stackTraceType;
}
@@ -463,7 +469,9 @@ class TestTypeProvider implements TypeProvider {
@override
InterfaceType get typeType {
if (_typeType == null) {
- _typeType = ElementFactory.classElement2("Type").type;
+ ClassElementImpl typeClassElement = ElementFactory.classElement2("Type");
+ _typeType = typeClassElement.type;
+ typeClassElement.constructors = <ConstructorElement>[];
}
return _typeType;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/builder.dart » ('j') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698