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

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

Issue 1579503005: fix #25409, error if a generic method argument did not have a corresponding parameter (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
Index: pkg/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 46d99db78ac57da85a0d7f6e547a964c795ca233..94558853e3729889f583ac64087816829c356e20 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -1389,7 +1389,19 @@ void main() {
class DerivedFuture4<A> extends Future<A> {
/*=B*/ then/*<B>*/(Object onValue(A a)) => null;
}
- '''
+ '''
+ });
+
+ testChecker('generic function wrong number of arguments', {
+ '/main.dart': r'''
+ /*=T*/ foo/*<T>*/(/*=T*/ x) => x;
+ main() {
+ // resolving thses shouldn't crash.
+ foo(1, 2);
+ String x = foo('1', '2');
+ String x = /*severe:STATIC_TYPE_ERROR*/foo(1, 2);
Leaf 2016/01/13 00:43:10 Also add a call with too few arguments, and maybe
Jennifer Messerly 2016/01/13 19:10:36 Good idea. Added.
+ }
+ '''
});
testChecker('unary operators', {

Powered by Google App Engine
This is Rietveld 408576698