Remove Param.legacyName, it's no longer used after the deletion of --incompatible_restrict_named_params in https://github.com/bazelbuild/bazel/commit/c0a11dc9db9ca148be26549fca9f57bbeafbdb15.

https://github.com/bazelbuild/bazel/issues/8147

RELNOTES: None
PiperOrigin-RevId: 303328602
diff --git a/src/main/java/com/google/devtools/build/docgen/ApiExporter.java b/src/main/java/com/google/devtools/build/docgen/ApiExporter.java
index b32886b..00c6bf2 100644
--- a/src/main/java/com/google/devtools/build/docgen/ApiExporter.java
+++ b/src/main/java/com/google/devtools/build/docgen/ApiExporter.java
@@ -316,7 +316,7 @@
     for (com.google.devtools.build.lib.skylarkinterface.Param param : annot.parameters()) {
       // Implicit * or *args parameter separates transition from positional to named.
       // f (..., *, ... )  or  f(..., *args, ...)
-      if ((param.named() || param.legacyNamed()) && !param.positional() && !hasStar) {
+      if (param.named() && !param.positional() && !hasStar) {
         hasStar = true;
         if (!annot.extraPositionals().name().isEmpty()) {
           star = annot.extraPositionals().name();
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java
index 97287b7..8637359 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java
@@ -120,8 +120,6 @@
         @Param(
             name = "name",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The name of the target.")
       },
       useStarlarkThread = true)
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java
index 8f1b8b6..651136f 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleFunctionsApi.java
@@ -524,7 +524,6 @@
         @Param(
             name = "label_string",
             type = String.class,
-            legacyNamed = true,
             doc = "the label string."),
         @Param(
             name = "relative_to_caller_repository",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java b/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java
index 52d5a99..525d7fd 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkinterface/Param.java
@@ -102,18 +102,6 @@
   boolean named() default false;
 
   /**
-   * If this true, {@link #named} should be treated as true.
-   *
-   * <p>This indicates this parameter is part of a {@link SkylarkCallable} method which was migrated
-   * from {@code SkylarkSignature}. Due to a pre-migration bug, all parameters were treated as if
-   * {@link #named} was true, even if it was false. To prevent breakages during migration, the
-   * interpreter can continue to treat these parameters as named. This is distinct from {@link
-   * #named}, however, so that a bulk fix/cleanup will be easier later.
-   */
-  // TODO(b/77902276): Remove this after a bulk cleanup/fix.
-  boolean legacyNamed() default false;
-
-  /**
    * If true, the parameter may be specified as a positional parameter. For example for an integer
    * positional parameter {@code foo} of a method {@code bar}, then the method call will look like
    * {@code bar(1)}. If {@link #named()} is {@code false}, then this will be the only way to call
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java b/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java
index eb8d771..916fd52 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkinterface/processor/SkylarkCallableProcessor.java
@@ -275,7 +275,7 @@
               "Positional parameter '%s' is specified after one or more non-positional parameters",
               paramAnnot.name());
         }
-        if (!isParamNamed(paramAnnot) && !allowPositionalOnlyNext) {
+        if (!paramAnnot.named() && !allowPositionalOnlyNext) {
           errorf(
               param,
               "Positional-only parameter '%s' is specified after one or more named parameters",
@@ -297,11 +297,11 @@
         // No positional parameters can come after this parameter.
         allowPositionalNext = false;
 
-        if (!isParamNamed(paramAnnot)) {
+        if (!paramAnnot.named()) {
           errorf(param, "Parameter '%s' must be either positional or named", paramAnnot.name());
         }
       }
-      if (isParamNamed(paramAnnot)) {
+      if (paramAnnot.named()) {
         // No positional-only parameters can come after this parameter.
         allowPositionalOnlyNext = false;
       }
@@ -310,10 +310,6 @@
     checkSpecialParams(method, annot);
   }
 
-  private static boolean isParamNamed(Param param) {
-    return param.named() || param.legacyNamed();
-  }
-
   // Checks consistency of a single parameter with its Param annotation.
   private void checkParameter(Element param, Param paramAnnot, TypeMirror objectType) {
     TypeMirror paramType = param.asType(); // type of the Java method parameter
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
index 82ec505..7148503 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
@@ -102,9 +102,7 @@
             name = "elements",
             type = Object.class,
             noneable = true,
-            doc = "A string or a collection of elements.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
+            doc = "A string or a collection of elements.")
       })
   public Boolean all(Object collection) throws EvalException {
     return !hasElementWithBooleanValue(collection, false);
@@ -122,9 +120,7 @@
             name = "elements",
             type = Object.class,
             noneable = true,
-            doc = "A string or a collection of elements.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
+            doc = "A string or a collection of elements.")
       })
   public Boolean any(Object collection) throws EvalException {
     return hasElementWithBooleanValue(collection, true);
@@ -148,12 +144,7 @@
               + "It is an error if elements are not comparable (for example int with string)."
               + "<pre class=\"language-python\">sorted([3, 5, 4]) == [3, 4, 5]</pre>",
       parameters = {
-        @Param(
-            name = "iterable",
-            type = Object.class,
-            doc = "The iterable sequence to sort.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+        @Param(name = "iterable", type = Object.class, doc = "The iterable sequence to sort."),
         @Param(
             name = "key",
             doc = "An optional function applied to each element before comparison.",
@@ -171,10 +162,7 @@
       },
       useStarlarkThread = true)
   public StarlarkList<?> sorted(
-      Object iterable,
-      final Object key,
-      Boolean reverse,
-      final StarlarkThread thread)
+      Object iterable, final Object key, Boolean reverse, final StarlarkThread thread)
       throws EvalException, InterruptedException {
     Object[] array = Starlark.toArray(iterable);
     if (key == Starlark.NONE) {
@@ -247,9 +235,7 @@
         @Param(
             name = "sequence",
             type = Sequence.class,
-            doc = "The sequence (list or tuple) to be reversed.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+            doc = "The sequence (list or tuple) to be reversed."),
       },
       useStarlarkThread = true)
   public StarlarkList<?> reversed(Sequence<?> sequence, StarlarkThread thread)
@@ -266,14 +252,7 @@
               + "<pre class=\"language-python\">tuple([1, 2]) == (1, 2)\n"
               + "tuple((2, 3, 2)) == (2, 3, 2)\n"
               + "tuple({5: \"a\", 2: \"b\", 4: \"c\"}) == (5, 2, 4)</pre>",
-      parameters = {
-        @Param(
-            name = "x",
-            defaultValue = "()",
-            doc = "The object to convert.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
-      })
+      parameters = {@Param(name = "x", defaultValue = "()", doc = "The object to convert.")})
   public Tuple<?> tuple(Object x) throws EvalException {
     if (x instanceof Tuple) {
       return (Tuple<?>) x;
@@ -288,14 +267,7 @@
               + "<pre class=\"language-python\">list([1, 2]) == [1, 2]\n"
               + "list((2, 3, 2)) == [2, 3, 2]\n"
               + "list({5: \"a\", 2: \"b\", 4: \"c\"}) == [5, 2, 4]</pre>",
-      parameters = {
-        @Param(
-            name = "x",
-            defaultValue = "[]",
-            doc = "The object to convert.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
-      },
+      parameters = {@Param(name = "x", defaultValue = "[]", doc = "The object to convert.")},
       useStarlarkThread = true)
   public StarlarkList<?> list(Object x, StarlarkThread thread) throws EvalException {
     return StarlarkList.wrap(thread.mutability(), Starlark.toArray(x));
@@ -306,13 +278,7 @@
       doc =
           "Returns the length of a string, sequence (such as a list or tuple), dict, or other"
               + " iterable.",
-      parameters = {
-        @Param(
-            name = "x",
-            doc = "The value whose length to report.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
-      },
+      parameters = {@Param(name = "x", doc = "The value whose length to report.")},
       useStarlarkThread = true)
   public Integer len(Object x, StarlarkThread thread) throws EvalException {
     int len = Starlark.len(x);
@@ -332,8 +298,6 @@
         @Param(
             name = "x",
             doc = "The object to convert.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true)
       })
   public String str(Object x) throws EvalException {
@@ -360,8 +324,6 @@
         @Param(
             name = "x",
             doc = "The object to convert.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true)
       })
   public String repr(Object x) {
@@ -381,8 +343,6 @@
             name = "x",
             defaultValue = "False",
             doc = "The variable to convert.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true)
       })
   public Boolean bool(Object x) throws EvalException {
@@ -432,12 +392,7 @@
               + "int(\"-0x10\", 0) == -16"
               + "</pre>",
       parameters = {
-        @Param(
-            name = "x",
-            type = Object.class,
-            doc = "The string to convert.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+        @Param(name = "x", type = Object.class, doc = "The string to convert."),
         @Param(
             name = "base",
             type = Object.class,
@@ -556,9 +511,7 @@
             defaultValue = "[]",
             doc =
                 "Either a dictionary or a list of entries. Entries must be tuples or lists with "
-                    + "exactly two elements: key, value.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+                    + "exactly two elements: key, value."),
       },
       extraKeywords = @Param(name = "kwargs", doc = "Dictionary of additional entries."),
       useStarlarkThread = true)
@@ -608,14 +561,7 @@
       // Deterministic hashing is important for the consistency of builds, hence why we
       // promise a specific algorithm. This is in contrast to Java (Object.hashCode()) and
       // Python, which promise stable hashing only within a given execution of the program.
-      parameters = {
-        @Param(
-            name = "value",
-            type = String.class,
-            doc = "String value to hash.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
-      })
+      parameters = {@Param(name = "value", type = String.class, doc = "String value to hash.")})
   public Integer hash(String value) throws EvalException {
     return value.hashCode();
   }
@@ -635,9 +581,7 @@
             type = Integer.class,
             doc =
                 "Value of the start element if stop is provided, "
-                    + "otherwise value of stop and the actual start is 0",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+                    + "otherwise value of stop and the actual start is 0"),
         @Param(
             name = "stop_or_none",
             type = Integer.class,
@@ -645,16 +589,12 @@
             defaultValue = "None",
             doc =
                 "optional index of the first item <i>not</i> to be included in the resulting "
-                    + "list; generation of the list stops before <code>stop</code> is reached.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+                    + "list; generation of the list stops before <code>stop</code> is reached."),
         @Param(
             name = "step",
             type = Integer.class,
             defaultValue = "1",
-            doc = "The increment (default is 1). It may be negative.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
+            doc = "The increment (default is 1). It may be negative.")
       },
       useStarlarkThread = true)
   public Sequence<Integer> range(
@@ -685,18 +625,8 @@
               + "<code>name</code>, otherwise False. Example:<br>"
               + "<pre class=\"language-python\">hasattr(ctx.attr, \"myattr\")</pre>",
       parameters = {
-        @Param(
-            name = "x",
-            doc = "The object to check.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
-            noneable = true),
-        @Param(
-            name = "name",
-            type = String.class,
-            doc = "The name of the attribute.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true)
+        @Param(name = "x", doc = "The object to check.", noneable = true),
+        @Param(name = "name", type = String.class, doc = "The name of the attribute.")
       },
       useStarlarkThread = true)
   public Boolean hasattr(Object obj, String name, StarlarkThread thread) throws EvalException {
@@ -718,25 +648,14 @@
               + "<pre class=\"language-python\">getattr(ctx.attr, \"myattr\")\n"
               + "getattr(ctx.attr, \"myattr\", \"mydefault\")</pre>",
       parameters = {
-        @Param(
-            name = "x",
-            doc = "The struct whose attribute is accessed.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
-            noneable = true),
-        @Param(
-            name = "name",
-            doc = "The name of the struct attribute.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true),
+        @Param(name = "x", doc = "The struct whose attribute is accessed.", noneable = true),
+        @Param(name = "name", doc = "The name of the struct attribute."),
         @Param(
             name = "default",
             defaultValue = "unbound",
             doc =
                 "The default value to return in case the struct "
                     + "doesn't have an attribute of the given name.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true)
       },
       useStarlarkThread = true)
@@ -761,8 +680,6 @@
         @Param(
             name = "x",
             doc = "The object to check.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true)
       },
       useStarlarkThread = true)
@@ -878,8 +795,6 @@
         @Param(
             name = "x",
             doc = "The object to check type of.",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true)
       })
   public String type(Object object) {
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
index 3aae105..ad8a597 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StringModule.java
@@ -118,8 +118,6 @@
         @Param(name = "self", type = String.class),
         @Param(
             name = "elements",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             type = Object.class,
             doc = "The objects to join.")
       })
@@ -203,8 +201,6 @@
         @Param(
             name = "chars",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             doc = "The characters to remove, or all whitespace if None.",
             defaultValue = "None")
@@ -228,8 +224,6 @@
         @Param(
             name = "chars",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             doc = "The characters to remove, or all whitespace if None.",
             defaultValue = "None")
@@ -254,8 +248,6 @@
         @Param(
             name = "chars",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             doc = "The characters to remove, or all whitespace if None.",
             defaultValue = "None")
@@ -275,14 +267,10 @@
         @Param(name = "self", type = String.class, doc = "This string."),
         @Param(
             name = "old",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             type = String.class,
             doc = "The string to be replaced."),
         @Param(
             name = "new",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             type = String.class,
             doc = "The string to replace with."),
         @Param(
@@ -290,8 +278,6 @@
             type = Integer.class,
             noneable = true,
             defaultValue = "None",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The maximum number of replacements.")
       })
   public String replace(String self, String oldString, String newString, Object maxSplitO)
@@ -332,15 +318,11 @@
         @Param(name = "self", type = String.class, doc = "This string."),
         @Param(
             name = "sep",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             type = String.class,
             doc = "The string to split on."),
         @Param(
             name = "maxsplit",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "The maximum number of splits.")
@@ -379,15 +361,11 @@
         @Param(name = "self", type = String.class, doc = "This string."),
         @Param(
             name = "sep",
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             type = String.class,
             doc = "The string to split on."),
         @Param(
             name = "maxsplit",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "The maximum number of splits.")
@@ -428,8 +406,6 @@
         @Param(
             name = "sep",
             type = Object.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "unbound",
             doc = "The string to split on.")
       },
@@ -459,8 +435,6 @@
         @Param(
             name = "sep",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "unbound",
             doc = "The string to split on.")
       },
@@ -599,21 +573,15 @@
         @Param(
             name = "sub",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring to find."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Restrict to search from this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "optional position before which to restrict to search.")
@@ -633,21 +601,15 @@
         @Param(
             name = "sub",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring to find."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Restrict to search from this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "optional position before which to restrict to search.")
@@ -667,21 +629,15 @@
         @Param(
             name = "sub",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring to find."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Restrict to search from this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "optional position before which to restrict to search.")
@@ -706,21 +662,15 @@
         @Param(
             name = "sub",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring to find."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Restrict to search from this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "optional position before which to restrict to search.")
@@ -744,8 +694,6 @@
         @Param(
             name = "keepends",
             type = Boolean.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "False",
             doc = "Whether the line breaks should be included in the resulting list.")
       })
@@ -908,21 +856,15 @@
         @Param(
             name = "sub",
             type = String.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring to count."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Restrict to search from this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "optional position before which to restrict to search.")
@@ -970,21 +912,15 @@
               @ParamType(type = String.class),
               @ParamType(type = Tuple.class, generic1 = String.class),
             },
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring to check."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Test beginning at this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "optional position at which to stop comparing.")
@@ -1061,21 +997,15 @@
               @ParamType(type = String.class),
               @ParamType(type = Tuple.class, generic1 = String.class),
             },
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             doc = "The substring(s) to check."),
         @Param(
             name = "start",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             defaultValue = "0",
             doc = "Test beginning at this position."),
         @Param(
             name = "end",
             type = Integer.class,
-            // TODO(cparsons): This parameter should be positional-only.
-            legacyNamed = true,
             noneable = true,
             defaultValue = "None",
             doc = "Stop comparing at this position.")
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
index c17c206..8adc6ce 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
@@ -196,25 +196,6 @@
     }
 
     @SkylarkCallable(
-      name = "legacy_method",
-      documented = false,
-      parameters = {
-        @Param(name = "pos", positional = true, type = Boolean.class),
-        @Param(name = "legacyNamed", type = Boolean.class, positional = true, named = false,
-            legacyNamed = true),
-        @Param(name = "named", type = Boolean.class, positional = false, named = true),
-      })
-    public String legacyMethod(Boolean pos, Boolean legacyNamed, Boolean named) {
-      return "legacy_method("
-          + pos
-          + ", "
-          + legacyNamed
-          + ", "
-          + named
-          + ")";
-    }
-
-    @SkylarkCallable(
         name = "with_params",
         documented = false,
         parameters = {
@@ -1885,7 +1866,6 @@
             "function",
             "interrupted_struct_field",
             "is_empty",
-            "legacy_method",
             "nullfunc_failing",
             "nullfunc_working",
             "proxy_methods_object",