Skip to content

Empty argument list is not shown in scaladoc in some cases #13148

Closed
@tkawachi

Description

@tkawachi

Compiler version

3.0.1

Minimized code

The comments above the definitions are generated type signature in HTML by scaladoc.

class C {
    // NG: def f1(implicit i: Int): Int
    def f1()(implicit i: Int) = i

    // NG: def f2(using i: Int): Int
    def f2()(using i: Int) = i

    // OK: def f3(s: String)(implicit i: Int): Int
    def f3(s: String)(implicit i: Int) = i

    // OK: def f4(s: String)(using i: Int): Int
    def f4(s: String)(using i: Int) = i

    // NG: def f5(using i: Int): Int
    def f5()()(using i: Int) = i

    // OK: def f6(): Int
    def f6() = 1

    // NG: def f7: Int
    def f7()() = 2

    // NG: def f8(i: Int): Int
    def f8(i: Int)() = 1
}

// NG: class C1(implicit i: Int)
class C1()(implicit i: Int)

// NG: class C2(using i: Int)
class C2()(using i: Int)

// NG: class C3
class C3()()

// NG: class C4(i: Int)
class C4()(i: Int)

Expectation

Empty argument list is shown in doc as-is.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions