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

Unified Diff: pkg/analyzer/test/src/context/mock_sdk.dart

Issue 1442883003: generic method type parameter inference (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/test/src/context/mock_sdk.dart
diff --git a/pkg/analyzer/test/src/context/mock_sdk.dart b/pkg/analyzer/test/src/context/mock_sdk.dart
index 121fb5d47ca06c0becbb8c55678f6bb735610a23..ad1c2f62483b165ebd41a8a6c25d4afcd3015fd7 100644
--- a/pkg/analyzer/test/src/context/mock_sdk.dart
+++ b/pkg/analyzer/test/src/context/mock_sdk.dart
@@ -86,6 +86,11 @@ class Iterator<E> {
abstract class Iterable<E> {
Iterator<E> get iterator;
bool get isEmpty;
+
+ Iterable/*<R>*/ map/*<R>*/(/*=R*/ f(E e));
+
+ /*=R*/ fold/*<R>*/(/*=R*/ initialValue,
+ /*=R*/ combine(/*=R*/ previousValue, E element));
}
abstract class List<E> implements Iterable<E> {
@@ -123,7 +128,10 @@ part 'stream.dart';
class Future<T> {
factory Future.delayed(Duration duration, [T computation()]) => null;
factory Future.value([value]) => null;
- static Future wait(List<Future> futures) => null;
+
+ static Future<List</*<T>*/> wait/*<T>*/(
+ Iterable<Future/*<T>*/> futures) => null;
+ Future/*<R>*/ then/*<R>*/(/*=R*/ onValue(T value)) => null;
}
''',
const <_MockSdkFile>[
@@ -162,11 +170,14 @@ class JsonDecoder extends Converter<String, Object> {}
'/lib/math/math.dart',
'''
library dart.math;
+
const double E = 2.718281828459045;
const double PI = 3.1415926535897932;
const double LN10 = 2.302585092994046;
-num min(num a, num b) => 0;
-num max(num a, num b) => 0;
+
+num/*=T*/ min/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null;
+num/*=T*/ max/*<T extends num>*/(num/*=T*/ a, num/*=T*/ b) => null;
+
external double cos(num x);
external double sin(num x);
external double sqrt(num x);

Powered by Google App Engine
This is Rietveld 408576698