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

Side by Side Diff: tests/language/generic_methods_function_type_test.dart

Issue 2514693003: Revert "Enable syntax-only support for generic functions by default." (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 // DartOptions=--generic-method-syntax
5 // VMOptions=--generic-method-syntax 6 // VMOptions=--generic-method-syntax
6 7
7 /// Dart test on the usage of method type arguments in a function typed 8 /// Dart test on the usage of method type arguments in a function typed
8 /// parameter declaration. 9 /// parameter declaration.
9 10
10 library generic_methods_function_type_test; 11 library generic_methods_function_type_test;
11 12
12 import "package:expect/expect.dart"; 13 import "package:expect/expect.dart";
13 14
14 class C<V> { 15 class C<V> {
15 U m1<U>(U f(V v), V v) => f(v); 16 U m1<U>(U f(V v), V v) => f(v);
16 V m2<U>(V f(U v), U u) => f(u); 17 V m2<U>(V f(U v), U u) => f(u);
17 } 18 }
18 19
19 main() { 20 main() {
20 Expect.equals(new C<int>().m1<int>((x) => x, 10), 10); 21 Expect.equals(new C<int>().m1<int>((x) => x, 10), 10);
21 Expect.equals(new C<int>().m2<int>((x) => x, 20), 20); 22 Expect.equals(new C<int>().m2<int>((x) => x, 20), 20);
22 } 23 }
23 24
OLDNEW
« no previous file with comments | « tests/language/generic_local_functions_test.dart ('k') | tests/language/generic_methods_generic_function_parameter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698