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

Unified Diff: test/generated_sdk/lib/core/function.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 | « test/generated_sdk/lib/core/expando.dart ('k') | test/generated_sdk/lib/core/identical.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/core/function.dart
diff --git a/test/generated_sdk/lib/core/function.dart b/test/generated_sdk/lib/core/function.dart
index 43fce78e83f90d457a10d86900e359f9819a5c9b..9146397aeae04ac22b4514f36d1e2ab23d8edad0 100644
--- a/test/generated_sdk/lib/core/function.dart
+++ b/test/generated_sdk/lib/core/function.dart
@@ -11,7 +11,28 @@ part of dart.core;
* subtype of a function type, and as such, a subtype of [Function].
*/
abstract class Function {
- @patch
+ /**
+ * Dynamically call [function] with the specified arguments.
+ *
+ * Acts the same as calling function with positional arguments
+ * corresponding to the elements of [positionalArguments] and
+ * named arguments corresponding to the elements of [namedArguments].
+ *
+ * This includes giving the same errors if [function] isn't callable or
+ * if it expects different parameters.
+ *
+ * Example:
+ * Map<Symbol, dynamic> namedArguments = new Map<Symbol, dynamic>();
+ * namedArguments[const Symbol("f")] = 4;
+ * namedArguments[const Symbol("g")] = 5;
+ * Function.apply(foo, [1,2,3], namedArguments);
+ *
+ * gives exactly the same result as
+ * foo(1, 2, 3, f: 4, g: 5).
+ *
+ * If [positionalArguments] is null, it's considered an empty list.
+ * If [namedArguments] is omitted or null, it is considered an empty map.
+ */
static apply(Function function,
List positionalArguments,
[Map<Symbol, dynamic> namedArguments]) {
« no previous file with comments | « test/generated_sdk/lib/core/expando.dart ('k') | test/generated_sdk/lib/core/identical.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698