diff options
author | Francois-Rene Rideau <tunes@google.com> | 2015-09-01 21:59:48 +0000 |
---|---|---|
committer | John Field <jfield@google.com> | 2015-09-02 00:58:31 +0000 |
commit | 8299504a4976470ed69c379987bcb94b01b97195 (patch) | |
tree | bb33a224e11238a62cbb928303ebecf484588e4c /src/main | |
parent | 0883ff0736eb03e0ca0a0cc7c9280ce76d900ae5 (diff) |
Update comments about function calls
--
MOS_MIGRATED_REVID=102083489
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java b/src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java index 43d27a2147..94a4f4c4fd 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java @@ -230,7 +230,7 @@ public abstract class BaseFunction { // (1) handle positional arguments if (hasStarParam) { // Nota Bene: we collect extra positional arguments in a (tuple,) rather than a [list], - // so the collection can be heterogeneous; that's a notable difference with Python. + // and this is actually the same as in Python. int starParamIndex = numNamedParams; if (numPositionalArgs > numPositionalParams) { arguments[starParamIndex] = SkylarkList.tuple( @@ -275,6 +275,7 @@ public abstract class BaseFunction { } // If there's a kwParam, it's empty. if (hasKwParam) { + // TODO(bazel-team): create a fresh mutable dict, like Python does arguments[kwParamIndex] = ImmutableMap.<String, Object>of(); } } else if (hasKwParam && numNamedParams == 0) { @@ -283,6 +284,7 @@ public abstract class BaseFunction { // Note that *starParam and **kwParam themselves don't count as named. // Also note that no named parameters means no mandatory parameters that weren't passed, // and no missing optional parameters for which to use a default. Thus, no loops. + // TODO(bazel-team): create a fresh mutable dict, like Python does arguments[kwParamIndex] = kwargs; // NB: not 2a means kwarg isn't null } else { // Hard general case (2c): some keyword arguments may correspond to named parameters @@ -323,6 +325,7 @@ public abstract class BaseFunction { } } if (hasKwParam) { + // TODO(bazel-team): create a fresh mutable dict, like Python does arguments[kwParamIndex] = ImmutableMap.copyOf(kwArg); } |