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

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 1579303002: fix generic function expressions, part of #25175 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.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/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index baf71fe8f3f0a9b81ff19fa10c8cdb923ed7b4c0..4722a658a21ad7ceae0acbfa1032c42336ec8b79 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -13043,6 +13043,8 @@ var topG = topF;
void test/*<S>*/(/*=T*/ pf/*<T>*/(/*=T*/ e)) {
var c = new C<int>();
/*=T*/ lf/*<T>*/(/*=T*/ e) => null;
+
+ var lambdaCall = (/*<E>*/(/*=E*/ e) => e)/*<int>*/(3);
var methodCall = (c.f)/*<int>*/(3);
var staticCall = (C.g)/*<int>*/(3);
var staticFieldCall = (C.h)/*<int>*/(3);
@@ -13059,6 +13061,7 @@ void test/*<S>*/(/*=T*/ pf/*<T>*/(/*=T*/ e)) {
expect(_findIdentifier('topFieldCall').staticType.toString(), "int");
expect(_findIdentifier('localCall').staticType.toString(), "int");
expect(_findIdentifier('paramCall').staticType.toString(), "int");
+ expect(_findIdentifier('lambdaCall').staticType.toString(), "int");
}
void fail_genericMethod_functionExpressionInvocation_inferred() {
@@ -13074,6 +13077,8 @@ var topG = topF;
void test/*<S>*/(/*=T*/ pf/*<T>*/(/*=T*/ e)) {
var c = new C<int>();
/*=T*/ lf/*<T>*/(/*=T*/ e) => null;
+
+ var lambdaCall = (/*<E>*/(/*=E*/ e) => e)(3);
var methodCall = (c.f)(3);
var staticCall = (C.g)(3);
var staticFieldCall = (C.h)(3);
@@ -13090,6 +13095,7 @@ void test/*<S>*/(/*=T*/ pf/*<T>*/(/*=T*/ e)) {
expect(_findIdentifier('topFieldCall').staticType.toString(), "int");
expect(_findIdentifier('localCall').staticType.toString(), "int");
expect(_findIdentifier('paramCall').staticType.toString(), "int");
+ expect(_findIdentifier('lambdaCall').staticType.toString(), "int");
}
void fail_genericMethod_functionInvocation_inferred() {
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698