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

Unified Diff: pkg/analyzer/test/src/task/strong/inferred_type_test.dart

Issue 1975753004: use GLB function in strong mode inference (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: comments Created 4 years, 7 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
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_ast_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index 83d6485eeeac394f93aef3144c924509eb752ecb..ab3c7dc40d1ebae71dece35f8871be132d142278 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -1571,6 +1571,19 @@ main() {
''');
}
+ void test_genericMethods_usesGreatestLowerBound() {
+ var mainUnit = checkFile(r'''
+typedef Iterable<num> F(int x);
+typedef List<int> G(double x);
+
+/*=T*/ generic/*<T>*/(a(/*=T*/ _), b(/*=T*/ _)) => null;
+
+var v = generic((F f) => null, (G g) => null);
+''');
+ var v = mainUnit.topLevelVariables[0];
+ expect(v.type.toString(), '(num) → List<int>');
+ }
+
void test_infer_assignToIndex() {
checkFile(r'''
List<double> a = <double>[];
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_ast_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698