| 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 953dcee3f328390123eddd88dc53f1f46688ebf7..c2a3a43320d9f52a655aac16f0629008fedcd108 100644
|
| --- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
|
| +++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
|
| @@ -64,6 +64,11 @@ class TestTypeProvider extends TypeProviderBase {
|
| InterfaceType _futureNullType;
|
|
|
| /**
|
| + * The type representing the built-in type 'FutureOr'
|
| + */
|
| + InterfaceType _futureOrType;
|
| +
|
| + /**
|
| * The type representing the built-in type 'Future'
|
| */
|
| InterfaceType _futureType;
|
| @@ -262,6 +267,26 @@ class TestTypeProvider extends TypeProviderBase {
|
| }
|
|
|
| @override
|
| + InterfaceType get futureOrType {
|
| + if (_futureOrType == null) {
|
| + Source asyncSource = _context.sourceFactory.forUri(DartSdk.DART_ASYNC);
|
| + _context.setContents(asyncSource, "");
|
| + CompilationUnitElementImpl asyncUnit =
|
| + new CompilationUnitElementImpl("async.dart");
|
| + LibraryElementImpl asyncLibrary = new LibraryElementImpl.forNode(
|
| + _context, AstTestFactory.libraryIdentifier2(["dart.async"]));
|
| + asyncLibrary.definingCompilationUnit = asyncUnit;
|
| + asyncUnit.librarySource = asyncUnit.source = asyncSource;
|
| +
|
| + ClassElementImpl futureOr =
|
| + ElementFactory.classElement2("FutureOr", ["T"]);
|
| + _futureOrType = futureOr.type;
|
| + asyncUnit.types = <ClassElement>[futureOr];
|
| + }
|
| + return _futureOrType;
|
| + }
|
| +
|
| + @override
|
| InterfaceType get futureType {
|
| if (_futureType == null) {
|
| Source asyncSource = _context.sourceFactory.forUri(DartSdk.DART_ASYNC);
|
|
|