Skip to content

Scaladoc cannot export methods with higher-kinded type parameters #13996

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

Closed
Atry opened this issue Nov 24, 2021 · 0 comments · Fixed by #14125
Closed

Scaladoc cannot export methods with higher-kinded type parameters #13996

Atry opened this issue Nov 24, 2021 · 0 comments · Fixed by #14125
Assignees
Milestone

Comments

@Atry
Copy link
Contributor

Atry commented Nov 24, 2021

Compiler version

3.1.0

Minimized code

package exportapply

object Binding:
  opaque type BindingT[M[_], A] <: M[A] = M[A]
  object BindingT:
    def apply[M[_], A](a: A): BindingT[M, A] = ???

  export BindingT._
// build.sbt
scalaVersion := "3.1.0
$ sbt doc

Output

[info] welcome to sbt 1.5.5 (Oracle Corporation Java 10.0.1)
[info] loading settings for project global-plugins from console.sbt ...
[info] loading global plugins from /Users/atry/.sbt/1.0/plugins
[info] loading project definition from /private/tmp/export-apply/project
[info] loading settings for project export-apply from build.sbt ...
[info] set current project to export-apply (in build file:/private/tmp/export-apply/)
[info] compiling 1 Scala source to /private/tmp/export-apply/target/scala-3.1.0/classes ...
[info] Main Scala API documentation to /private/tmp/export-apply/target/scala-3.1.0/api...
[warn] -- Warning: exportapply.scala:8:18 ---------------------------------------------
[warn] 8 |  export BindingT._
[warn]   |                  ^
[warn]   |java.lang.ClassCastException: dotty.tools.dotc.ast.Trees$TypeApply cannot be cast to dotty.tools.dotc.ast.Trees$Select
[warn]   |	at scala.quoted.runtime.impl.QuotesImpl$reflect$SelectMethods$.name(QuotesImpl.scala:496)
[warn]   |	at dotty.tools.scaladoc.tasty.ClassLikeSupport.$anonfun$39(ClassLikeSupport.scala:288)
[warn]   |	at scala.Option.fold(Option.scala:263)
[warn]   |	at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember$$anonfun$1(ClassLikeSupport.scala:288)
[warn] one warning found
[info] Main Scala API documentation successful.
[success] Total time: 4 s, completed 2021年11月23日 下午10:35:35

The apply method does not appear in target/scala-3.1.0/api/exportapply/Binding$.html

Expectation

The apply method should appear in target/scala-3.1.0/api/exportapply/Binding$.html

@Atry Atry added the itype:bug label Nov 24, 2021
@Atry Atry changed the title Scaladoc cannot export the apply method Scaladoc cannot export methods with higher-kind type parameters Nov 24, 2021
@Atry Atry changed the title Scaladoc cannot export methods with higher-kind type parameters Scaladoc cannot export methods with higher-kinded type parameters Dec 9, 2021
@pikinier20 pikinier20 self-assigned this Dec 14, 2021
@Kordyjan Kordyjan added this to the 3.1.2 milestone Aug 2, 2023
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