Skip to content

Wrong ScalaDoc for TypeApi members and decls regarding sorted #11896

Closed
@OndrejSpanel

Description

@OndrejSpanel

Scala 2.12.10 and 2.13.1 for both Types.TypeApi decls and members mentions declarations.sorted.

See also https://www.scala-lang.org/api/current/scala-reflect/scala/reflect/api/Types$TypeApi.html#decls:Types.this.MemberScope

    /** A `Scope` containing directly declared members of this type.
     *  Unlike `members` this method doesn't returns inherited members.
     *
     *  Members in the returned scope might appear in arbitrary order.
     *  Use `declarations.sorted` to get an ordered list of members.
     */
    def decls: MemberScope
    /** A `Scope` containing all members of this type (directly declared or inherited).
     *  Unlike `declarations` this method also returns inherited members.
     *
     *  Members in the returned scope might appear in arbitrary order.
     *  Use `declarations.sorted` to get an ordered list of members.
     */
    def members: MemberScope

It should be Use decls.sorted and Use members.sorted instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions