Skip to content

Commit a9a16eb

Browse files
authored
fix incorrect scaladoc @param (#17295)
2 parents b70698d + 21ddebe commit a9a16eb

File tree

16 files changed

+24
-27
lines changed

16 files changed

+24
-27
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -855,9 +855,9 @@ object Trees {
855855
}
856856

857857
/** extends parents { self => body }
858-
* @param parentsOrDerived A list of parents followed by a list of derived classes,
859-
* if this is of class untpd.DerivingTemplate.
860-
* Typed templates only have parents.
858+
* @param preParentsOrDerived A list of parents followed by a list of derived classes,
859+
* if this is of class untpd.DerivingTemplate.
860+
* Typed templates only have parents.
861861
*/
862862
case class Template[+T <: Untyped] private[ast] (constr: DefDef[T], private var preParentsOrDerived: LazyTreeList[T], self: ValDef[T], private var preBody: LazyTreeList[T])(implicit @constructorOnly src: SourceFile)
863863
extends DefTree[T] with WithLazyFields {

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
15481548
*
15491549
* @param trees the elements the list represented by
15501550
* the resulting tree should contain.
1551-
* @param tpe the type of the elements of the resulting list.
1551+
* @param tpt the type of the elements of the resulting list.
15521552
*
15531553
*/
15541554
def mkList(trees: List[Tree], tpt: Tree)(using Context): Tree =

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,9 +1407,9 @@ object SymDenotations {
14071407
case Nil => Iterator.empty
14081408
}
14091409

1410-
/** The symbol overriding this symbol in given subclass `ofclazz`.
1410+
/** The symbol overriding this symbol in given subclass `inClass`.
14111411
*
1412-
* @param ofclazz is a subclass of this symbol's owner
1412+
* @pre `inClass` is a subclass of this symbol's owner
14131413
*/
14141414
final def overridingSymbol(inClass: ClassSymbol)(using Context): Symbol =
14151415
if (canMatchInheritedSymbols) matchingDecl(inClass, inClass.thisType)

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ object Symbols {
4040
val Ids: Property.Key[Array[String]] = new Property.Key
4141

4242
/** A Symbol represents a Scala definition/declaration or a package.
43-
* @param coord The coordinates of the symbol (a position or an index)
43+
* @param myCoord The coordinates of the symbol (a position or an index)
4444
* @param id A unique identifier of the symbol (unique per ContextBase)
4545
*/
4646
class Symbol private[Symbols] (private var myCoord: Coord, val id: Int, val nestingLevel: Int)

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,8 @@ object Scala2Unpickler {
133133
/** Unpickle symbol table information descending from a class and/or module root
134134
* from an array of bytes.
135135
* @param bytes bytearray from which we unpickle
136-
* @param classroot the top-level class which is unpickled, or NoSymbol if inapplicable
137-
* @param moduleroot the top-level module class which is unpickled, or NoSymbol if inapplicable
138-
* @param filename filename associated with bytearray, only used for error messages
136+
* @param classRoot the top-level class which is unpickled, or NoSymbol if inapplicable
137+
* @param moduleClassRoot the top-level module class which is unpickled, or NoSymbol if inapplicable
139138
*/
140139
class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: ClassDenotation)(ictx: Context)
141140
extends PickleBuffer(bytes, 0, -1) with ClassfileParser.Embedded {

compiler/src/dotty/tools/dotc/coverage/Location.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import dotty.tools.dotc.util.SourceFile
1313
* @param className name of the closest enclosing class
1414
* @param fullClassName fully qualified name of the closest enclosing class
1515
* @param classType "type" of the closest enclosing class: Class, Trait or Object
16-
* @param method name of the closest enclosing method
16+
* @param methodName name of the closest enclosing method
1717
* @param sourcePath absolute path of the source file
1818
*/
1919
final case class Location(

compiler/src/dotty/tools/dotc/inlines/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class Inliner(val call: tpd.Tree)(using Context):
201201
* to `buf`.
202202
* @param name the name of the parameter
203203
* @param formal the type of the parameter
204-
* @param arg the argument corresponding to the parameter
204+
* @param arg0 the argument corresponding to the parameter
205205
* @param buf the buffer to which the definition should be appended
206206
*/
207207
private[inlines] def paramBindingDef(name: Name, formal: Type, arg0: Tree,

compiler/src/dotty/tools/dotc/inlines/PrepareInlineable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ object PrepareInlineable {
256256

257257
/** Register inline info for given inlineable method `sym`.
258258
*
259-
* @param sym The symbol denotation of the inlineable method for which info is registered
259+
* @param inlined The symbol denotation of the inlineable method for which info is registered
260260
* @param treeExpr A function that computes the tree to be inlined, given a context
261261
* This tree may still refer to non-public members.
262262
* @param ctx The context to use for evaluating `treeExpr`. It needs

compiler/src/dotty/tools/dotc/plugins/Plugin.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sealed trait Plugin {
4444
trait StandardPlugin extends Plugin {
4545
/** Non-research plugins should override this method to return the phases
4646
*
47-
* @param options: commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
47+
* @param options commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
4848
* @return a list of phases to be added to the phase plan
4949
*/
5050
def init(options: List[String]): List[PluginPhase]
@@ -57,8 +57,8 @@ trait StandardPlugin extends Plugin {
5757
trait ResearchPlugin extends Plugin {
5858
/** Research plugins should override this method to return the new phase plan
5959
*
60-
* @param options: commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
61-
* @param plan: the given phase plan
60+
* @param options commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
61+
* @param plan the given phase plan
6262
* @return the new phase plan
6363
*/
6464
def init(options: List[String], plan: List[List[Phase]])(using Context): List[List[Phase]]

compiler/src/dotty/tools/dotc/transform/init/Cache.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ import tpd.Tree
5050
* need to be decided by the specific analysis and justified by reasoning about
5151
* soundness.
5252
*
53-
* @param Config The analysis state that matters for evaluating an expression.
54-
* @param Res The result from the evaluation the given expression.
53+
* @tparam Config The analysis state that matters for evaluating an expression.
54+
* @tparam Res The result from the evaluation the given expression.
5555
*/
5656
class Cache[Config, Res]:
5757
import Cache.*

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,6 @@ trait Implicits:
15911591
* implicit search.
15921592
*
15931593
* @param cand The candidate implicit to be explored.
1594-
* @param pt The target type for the above candidate.
15951594
* @result True if this candidate/pt are divergent, false otherwise.
15961595
*/
15971596
def checkDivergence(cand: Candidate): Boolean =

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ object RefChecks {
295295
* TODO This still needs to be cleaned up; the current version is a straight port of what was there
296296
* before, but it looks too complicated and method bodies are far too large.
297297
*
298-
* @param makeOverridePairsChecker A function for creating a OverridePairsChecker instance
298+
* @param makeOverridingPairsChecker A function for creating a OverridePairsChecker instance
299299
* from the class symbol and the self type
300300
*/
301301
def checkAllOverrides(clazz: ClassSymbol, makeOverridingPairsChecker: ((ClassSymbol, Type) => Context ?=> OverridingPairsChecker) | Null = null)(using Context): Unit = {

compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait TypeAssigner {
1818
import TypeAssigner.*
1919

2020
/** The qualifying class of a this or super with prefix `qual` (which might be empty).
21-
* @param packageOk The qualifier may refer to a package.
21+
* @param packageOK The qualifier may refer to a package.
2222
*/
2323
def qualifyingClass(tree: untpd.Tree, qual: Name, packageOK: Boolean)(using Context): Symbol = {
2424
def qualifies(sym: Symbol) =

compiler/src/dotty/tools/dotc/util/Signatures.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ object Signatures {
5454
* Extract (current parameter index, function index, functions) method call for given position.
5555
*
5656
* @param path The path to the function application
57-
* @param span The position of the cursor
57+
* @param pos The position of the cursor
5858
*
5959
* @return A triple containing the index of the parameter being edited, the index of functeon
6060
* being called, the list of overloads of this function).

compiler/src/dotty/tools/dotc/util/StackTraceOps.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ object StackTraceOps:
2929
* If a stack trace is truncated, it will be followed by a line of the form
3030
* `... 3 elided`, by analogy to the lines `... 3 more` which indicate
3131
* shared stack trace segments.
32-
* @param e the exception
3332
* @param p the predicate to select the prefix
3433
*/
3534
def formatStackTracePrefix(p: StackTraceElement => Boolean): String =

library/src/scala/quoted/Quotes.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,9 +1429,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
14291429
* )
14301430
* ```
14311431
*
1432-
* @param owner: owner of the generated `meth` symbol
1433-
* @param tpe: Type of the definition
1434-
* @param rhsFn: Function that receives the `meth` symbol and the a list of references to the `params`
1432+
* @param owner owner of the generated `meth` symbol
1433+
* @param tpe Type of the definition
1434+
* @param rhsFn Function that receives the `meth` symbol and the a list of references to the `params`
14351435
*/
14361436
def apply(owner: Symbol, tpe: MethodType, rhsFn: (Symbol, List[Tree]) => Tree): Block
14371437
}
@@ -1764,7 +1764,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
17641764

17651765
/** Returns a type tree reference to the symbol
17661766
*
1767-
* @param sym The type symbol for which we are creating a type tree reference.
1767+
* @param typeSymbol The type symbol for which we are creating a type tree reference.
17681768
*/
17691769
def ref(typeSymbol: Symbol): TypeTree
17701770
}

0 commit comments

Comments
 (0)