scala/scala3

Types unhandled by the scaladoc TASTy types support

Closed this issue · 1 comments

The following projects are emmiting warning when generating scaladoc:

scalapb/zio-grpc - build logs

rescala-lang/rescala - build logs

Compiler version

3.7.0-RC1-bin-20250307-977232c-NIGHTLY

Needs minimizaiton

Output

scala.MatchError: Encountered unsupported type. Report this problem to https://github.com/scala/scala3/.
<Internal compiler type SkolemType(1162214087) does not have a corresponding reflect extractor> (of class java.lang.String)
        at dotty.tools.scaladoc.tasty.TypesSupport.inner(TypesSupport.scala:324)
        at dotty.tools.scaladoc.tasty.TypesSupport.inner(TypesSupport.scala:272)
        at dotty.tools.scaladoc.tasty.TypesSupport.dotty$tools$scaladoc$tasty$TypesSupport$$topLevelProcess(TypesSupport.scala:77)
[warn]    |scala.MatchError: Encountered unsupported type. Report this problem to [https://github.com/scala/scala3/.](https://github.com/scala/scala3/)
[warn]    |FlexibleType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "nio")), "channels"), "Selector")) (of class java.lang.String)
[warn]    |	at dotty.tools.scaladoc.tasty.TypesSupport.inner(TypesSupport.scala:324)
[warn]    |	at dotty.tools.scaladoc.tasty.TypesSupport.dotty$tools$scaladoc$tasty$TypesSupport$$topLevelProcess(TypesSupport.scala:77)
[warn]    |	at dotty.tools.scaladoc.tasty.TypesSupport$TypeSyntax$.asSignature(TypesSupport.scala:29)

Expectation

Should be handled by scaladoc

Actually this issue can be even found in our own codebase:

[warn] -- Warning: compiler/src/dotty/tools/MainGenericCompiler.scala:90:6 ------------
[warn] 90 |  val classpathSeparator = File.pathSeparator
[warn]    |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[warn]    |scala.MatchError: Encountered unsupported type. Report this problem to [https://github.com/scala/scala3/.](https://github.com/scala/scala3/)
[warn]    |FlexibleType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "java")), "lang"), "String")) (of class java.lang.String)
[warn]    |	at dotty.tools.scaladoc.tasty.TypesSupport.inner(TypesSupport.scala:324)
[warn]    |	at dotty.tools.scaladoc.tasty.TypesSupport.dotty$tools$scaladoc$tasty$TypesSupport$$topLevelProcess(TypesSupport.scala:77)
[warn]    |	at dotty.tools.scaladoc.tasty.TypesSupport$TypeSyntax$.asSignature(TypesSupport.scala:29)