Skip to content

fix incorrect scaladoc @param #17295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/ast/Trees.scala
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,9 @@ object Trees {
}

/** extends parents { self => body }
* @param parentsOrDerived A list of parents followed by a list of derived classes,
* if this is of class untpd.DerivingTemplate.
* Typed templates only have parents.
* @param preParentsOrDerived A list of parents followed by a list of derived classes,
* if this is of class untpd.DerivingTemplate.
* Typed templates only have parents.
*/
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)
extends DefTree[T] with WithLazyFields {
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/ast/tpd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
*
* @param trees the elements the list represented by
* the resulting tree should contain.
* @param tpe the type of the elements of the resulting list.
* @param tpt the type of the elements of the resulting list.
*
*/
def mkList(trees: List[Tree], tpt: Tree)(using Context): Tree =
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1407,9 +1407,9 @@ object SymDenotations {
case Nil => Iterator.empty
}

/** The symbol overriding this symbol in given subclass `ofclazz`.
/** The symbol overriding this symbol in given subclass `inClass`.
*
* @param ofclazz is a subclass of this symbol's owner
* @pre `inClass` is a subclass of this symbol's owner
*/
final def overridingSymbol(inClass: ClassSymbol)(using Context): Symbol =
if (canMatchInheritedSymbols) matchingDecl(inClass, inClass.thisType)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Symbols.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object Symbols {
val Ids: Property.Key[Array[String]] = new Property.Key

/** A Symbol represents a Scala definition/declaration or a package.
* @param coord The coordinates of the symbol (a position or an index)
* @param myCoord The coordinates of the symbol (a position or an index)
* @param id A unique identifier of the symbol (unique per ContextBase)
*/
class Symbol private[Symbols] (private var myCoord: Coord, val id: Int, val nestingLevel: Int)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ object Scala2Unpickler {
/** Unpickle symbol table information descending from a class and/or module root
* from an array of bytes.
* @param bytes bytearray from which we unpickle
* @param classroot the top-level class which is unpickled, or NoSymbol if inapplicable
* @param moduleroot the top-level module class which is unpickled, or NoSymbol if inapplicable
* @param filename filename associated with bytearray, only used for error messages
* @param classRoot the top-level class which is unpickled, or NoSymbol if inapplicable
* @param moduleClassRoot the top-level module class which is unpickled, or NoSymbol if inapplicable
*/
class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: ClassDenotation)(ictx: Context)
extends PickleBuffer(bytes, 0, -1) with ClassfileParser.Embedded {
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/coverage/Location.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import dotty.tools.dotc.util.SourceFile
* @param className name of the closest enclosing class
* @param fullClassName fully qualified name of the closest enclosing class
* @param classType "type" of the closest enclosing class: Class, Trait or Object
* @param method name of the closest enclosing method
* @param methodName name of the closest enclosing method
* @param sourcePath absolute path of the source file
*/
final case class Location(
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/inlines/Inliner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Inliner(val call: tpd.Tree)(using Context):
* to `buf`.
* @param name the name of the parameter
* @param formal the type of the parameter
* @param arg the argument corresponding to the parameter
* @param arg0 the argument corresponding to the parameter
* @param buf the buffer to which the definition should be appended
*/
private[inlines] def paramBindingDef(name: Name, formal: Type, arg0: Tree,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ object PrepareInlineable {

/** Register inline info for given inlineable method `sym`.
*
* @param sym The symbol denotation of the inlineable method for which info is registered
* @param inlined The symbol denotation of the inlineable method for which info is registered
* @param treeExpr A function that computes the tree to be inlined, given a context
* This tree may still refer to non-public members.
* @param ctx The context to use for evaluating `treeExpr`. It needs
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/plugins/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sealed trait Plugin {
trait StandardPlugin extends Plugin {
/** Non-research plugins should override this method to return the phases
*
* @param options: commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
* @param options commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
* @return a list of phases to be added to the phase plan
*/
def init(options: List[String]): List[PluginPhase]
Expand All @@ -57,8 +57,8 @@ trait StandardPlugin extends Plugin {
trait ResearchPlugin extends Plugin {
/** Research plugins should override this method to return the new phase plan
*
* @param options: commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
* @param plan: the given phase plan
* @param options commandline options to the plugin, `-P:plugname:opt1,opt2` becomes List(opt1, opt2)
* @param plan the given phase plan
* @return the new phase plan
*/
def init(options: List[String], plan: List[List[Phase]])(using Context): List[List[Phase]]
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/transform/init/Cache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ import tpd.Tree
* need to be decided by the specific analysis and justified by reasoning about
* soundness.
*
* @param Config The analysis state that matters for evaluating an expression.
* @param Res The result from the evaluation the given expression.
* @tparam Config The analysis state that matters for evaluating an expression.
* @tparam Res The result from the evaluation the given expression.
*/
class Cache[Config, Res]:
import Cache.*
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/typer/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,6 @@ trait Implicits:
* implicit search.
*
* @param cand The candidate implicit to be explored.
* @param pt The target type for the above candidate.
* @result True if this candidate/pt are divergent, false otherwise.
*/
def checkDivergence(cand: Candidate): Boolean =
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/RefChecks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ object RefChecks {
* TODO This still needs to be cleaned up; the current version is a straight port of what was there
* before, but it looks too complicated and method bodies are far too large.
*
* @param makeOverridePairsChecker A function for creating a OverridePairsChecker instance
* @param makeOverridingPairsChecker A function for creating a OverridePairsChecker instance
* from the class symbol and the self type
*/
def checkAllOverrides(clazz: ClassSymbol, makeOverridingPairsChecker: ((ClassSymbol, Type) => Context ?=> OverridingPairsChecker) | Null = null)(using Context): Unit = {
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait TypeAssigner {
import TypeAssigner.*

/** The qualifying class of a this or super with prefix `qual` (which might be empty).
* @param packageOk The qualifier may refer to a package.
* @param packageOK The qualifier may refer to a package.
*/
def qualifyingClass(tree: untpd.Tree, qual: Name, packageOK: Boolean)(using Context): Symbol = {
def qualifies(sym: Symbol) =
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/util/Signatures.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ object Signatures {
* Extract (current parameter index, function index, functions) method call for given position.
*
* @param path The path to the function application
* @param span The position of the cursor
* @param pos The position of the cursor
*
* @return A triple containing the index of the parameter being edited, the index of functeon
* being called, the list of overloads of this function).
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dotty/tools/dotc/util/StackTraceOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ object StackTraceOps:
* If a stack trace is truncated, it will be followed by a line of the form
* `... 3 elided`, by analogy to the lines `... 3 more` which indicate
* shared stack trace segments.
* @param e the exception
* @param p the predicate to select the prefix
*/
def formatStackTracePrefix(p: StackTraceElement => Boolean): String =
Expand Down
8 changes: 4 additions & 4 deletions library/src/scala/quoted/Quotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1429,9 +1429,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
* )
* ```
*
* @param owner: owner of the generated `meth` symbol
* @param tpe: Type of the definition
* @param rhsFn: Function that receives the `meth` symbol and the a list of references to the `params`
* @param owner owner of the generated `meth` symbol
* @param tpe Type of the definition
* @param rhsFn Function that receives the `meth` symbol and the a list of references to the `params`
*/
def apply(owner: Symbol, tpe: MethodType, rhsFn: (Symbol, List[Tree]) => Tree): Block
}
Expand Down Expand Up @@ -1764,7 +1764,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>

/** Returns a type tree reference to the symbol
*
* @param sym The type symbol for which we are creating a type tree reference.
* @param typeSymbol The type symbol for which we are creating a type tree reference.
*/
def ref(typeSymbol: Symbol): TypeTree
}
Expand Down