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

Scaladoc issue with capture checking #19967

Closed
nicolasstucki opened this issue Mar 18, 2024 · 2 comments · Fixed by #20333
Closed

Scaladoc issue with capture checking #19967

nicolasstucki opened this issue Mar 18, 2024 · 2 comments · Fixed by #20333
Assignees
Milestone

Comments

@nicolasstucki
Copy link
Contributor

Compiler version

3.4.0

Reproduction

Note: this diff should not be committed to main at this time

Build.scala

  lazy val Scala3 = Def.task {
    val dottyJars: Seq[java.io.File] = Seq(
-     (`scala2-library-bootstrapped`/Compile/products).value,
+    (`scala2-library-cc`/Compile/products).value,
      (`scala3-library-bootstrapped`/Compile/products).value,
      (`scala3-interfaces`/Compile/products).value,
      (`tasty-core-bootstrapped`/Compile/products).value,
    ).flatten
sbt> scaladoc/generateScalaDocumentation

Output

...
Problem parsing scala2-library-cc/src/scala/collection/immutable/LazyListIterable.scala:[290..298..51443], documentation may not be generated.
...
WARN: Unsupported type: Not supported type in refinement ContextualMethodType(List(x$1), List(AnnotatedType(AppliedType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object scala),CanThrow),List(TypeRef(NoPrefix,type E))),ConcreteAnnotation(Apply(Select(New(TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module class internal)),class ErasedParam)]),<init>),List())))), TypeRef(NoPrefix,type R)): scala.PolyFunction {
  def apply(x$1: scala.CanThrow[E] @scala.annotation.internal.ErasedParam): R
}
Companion for class LazyListIterable exists but is missing in classlike map
...

Expectation

Should generate doc with no warnings

@nicolasstucki
Copy link
Contributor Author

nicolasstucki commented Mar 18, 2024

@Florian3k, this type

ContextualMethodType(List(x$1), List(AnnotatedType(AppliedType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object scala),CanThrow),List(TypeRef(NoPrefix,type E))),ConcreteAnnotation(Apply(Select(New(TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module class internal)),class ErasedParam)]),<init>),List())))), TypeRef(NoPrefix,type R)): scala.PolyFunction {
  def apply(x$1: scala.CanThrow[E] @scala.annotation.internal.ErasedParam): R
}

is a

(erased x$1: scala.CanThrow[E]) ?=> R

@Florian3k
Copy link
Contributor

This is most likely not related to capture checking.
@Linyxus - I'll take care of this.

@Florian3k Florian3k removed the area:experimental:cc Capture checking related label Apr 8, 2024
Florian3k added a commit that referenced this issue May 6, 2024
Fixes #19967
Improves rendering of refined function types - unneeded parameters names
are omitted when possible
WojciechMazur pushed a commit to WojciechMazur/dotty that referenced this issue May 6, 2024
Fixes scala#19967
Improves rendering of refined function types - unneeded parameters names
are omitted when possible
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur pushed a commit that referenced this issue Jul 6, 2024
Fixes #19967
Improves rendering of refined function types - unneeded parameters names
are omitted when possible
[Cherry-picked 55025c2]
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