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

Side by Side Diff: pkg/analysis_server/test/mock_sdk.dart

Issue 2581803002: Add access to FutureOr in TypeProviders (and add implementation in mock sdks) (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library testing.mock_sdk; 5 library testing.mock_sdk;
6 6
7 import 'package:analyzer/file_system/file_system.dart' as resource; 7 import 'package:analyzer/file_system/file_system.dart' as resource;
8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource;
9 import 'package:analyzer/src/context/context.dart'; 9 import 'package:analyzer/src/context/context.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 import 'dart:math'; 167 import 'dart:math';
168 168
169 class Future<T> { 169 class Future<T> {
170 factory Future(computation()) => null; 170 factory Future(computation()) => null;
171 factory Future.delayed(Duration duration, [T computation()]) => null; 171 factory Future.delayed(Duration duration, [T computation()]) => null;
172 factory Future.value([value]) => null; 172 factory Future.value([value]) => null;
173 static Future wait(List<Future> futures) => null; 173 static Future wait(List<Future> futures) => null;
174 } 174 }
175 175
176 class FutureOr<T> {}
177
176 class Stream<T> {} 178 class Stream<T> {}
177 abstract class StreamTransformer<S, T> {} 179 abstract class StreamTransformer<S, T> {}
178 '''); 180 ''');
179 181
180 static const MockSdkLibrary LIB_COLLECTION = const MockSdkLibrary( 182 static const MockSdkLibrary LIB_COLLECTION = const MockSdkLibrary(
181 'dart:collection', 183 'dart:collection',
182 '/lib/collection/collection.dart', 184 '/lib/collection/collection.dart',
183 ''' 185 '''
184 library dart.collection; 186 library dart.collection;
185 187
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 bool get isInternal => shortName.startsWith('dart:_'); 435 bool get isInternal => shortName.startsWith('dart:_');
434 436
435 @override 437 @override
436 bool get isShared => throw unimplemented; 438 bool get isShared => throw unimplemented;
437 439
438 @override 440 @override
439 bool get isVmLibrary => throw unimplemented; 441 bool get isVmLibrary => throw unimplemented;
440 442
441 UnimplementedError get unimplemented => new UnimplementedError(); 443 UnimplementedError get unimplemented => new UnimplementedError();
442 } 444 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | pkg/analyzer/lib/src/summary/link.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698