Skip to content
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

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

Closed
tkawachi opened this issue Jul 25, 2021 · 0 comments · Fixed by #13192
Closed

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

tkawachi opened this issue Jul 25, 2021 · 0 comments · Fixed by #13192
Assignees
Milestone

Comments

@tkawachi
Copy link

tkawachi commented Jul 25, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants