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

Unified Diff: tests/language/generic_functions_test.dart

Issue 1939053002: Add test on dart2js static analysis of method type parameters. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Review response 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 | « tests/compiler/dart2js/generic_method_type_usage_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/generic_functions_test.dart
diff --git a/tests/language/generic_functions_test.dart b/tests/language/generic_functions_test.dart
index 814163a33f9051e4d488b7bf3c554e3a35fd83f2..e3f6cafa3d7f00fadf21390a5fc3cae42703bc8f 100644
--- a/tests/language/generic_functions_test.dart
+++ b/tests/language/generic_functions_test.dart
@@ -55,19 +55,16 @@ class BinaryTreeNode<K extends Comparable<K>, V> {
}
}
-// Use fresh type variables.
BinaryTreeNode<K2, V2> insertOpt<K2 extends Comparable<K2>, V2>(
BinaryTreeNode<K2, V2> t, K2 key, V2 value) {
return (t == null) ? new BinaryTreeNode(key, value) : t.insert(key, value);
}
-// Reuse type variables [K], [V] to test shadowing.
BinaryTreeNode<K, U> mapOpt<K extends Comparable<K>, V, U>(
BinaryTreeNode<K, V> t, U f(V x)) {
return (t == null) ? null : t.map<U>(f);
}
-// Use fresh [K2], shadowing [V].
S foldPreOpt<K2 extends Comparable<K2>, V, S>(
BinaryTreeNode<K2, V> t, S init, S f(V t, S s)) {
return (t == null) ? init : t.foldPre<S>(init, f);
« no previous file with comments | « tests/compiler/dart2js/generic_method_type_usage_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698