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

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

Issue 895113002: Add static type checking of "yield" statements to analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/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 099e50c143bb0413f9397756f657ce9147c71d68..7df920aed0b601c642159f776be1893b81699b86 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -62,6 +62,11 @@ class TestTypeProvider implements TypeProvider {
InterfaceType _intType;
/**
+ * The type representing 'Iterable<dynamic>'
+ */
+ InterfaceType _iterableDynamicType;
+
+ /**
* The type representing the built-in type 'Iterable'.
*/
InterfaceType _iterableType;
@@ -102,6 +107,16 @@ class TestTypeProvider implements TypeProvider {
InterfaceType _stackTraceType;
/**
+ * The type representing 'Stream<dynamic>'.
+ */
+ InterfaceType _streamDynamicType;
+
+ /**
+ * The type representing the built-in type 'Stream'.
+ */
+ InterfaceType _streamType;
+
+ /**
* The type representing the built-in type 'String'.
*/
InterfaceType _stringType;
@@ -205,6 +220,15 @@ class TestTypeProvider implements TypeProvider {
return _intType;
}
+ @override
+ InterfaceType get iterableDynamicType {
+ if (_iterableDynamicType == null) {
+ _iterableDynamicType = iterableType.substitute4(<DartType>[dynamicType]);
+ }
+ return _iterableDynamicType;
+ }
+
+ @override
InterfaceType get iterableType {
if (_iterableType == null) {
ClassElementImpl iterableElement =
@@ -329,6 +353,22 @@ class TestTypeProvider implements TypeProvider {
}
@override
+ InterfaceType get streamDynamicType {
+ if (_streamDynamicType == null) {
+ _streamDynamicType = streamType.substitute4(<DartType>[dynamicType]);
+ }
+ return _streamDynamicType;
+ }
+
+ @override
+ InterfaceType get streamType {
+ if (_streamType == null) {
+ _streamType = ElementFactory.classElement2("Stream", ["T"]).type;
+ }
+ return _streamType;
+ }
+
+ @override
InterfaceType get stringType {
if (_stringType == null) {
_stringType = ElementFactory.classElement2("String").type;
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698