Closed xuwei-k closed 3 years ago
https://github.com/lampepfl/dotty/blob/d81b0e502dd29e24d8594d48da3f405d4ea75c51/scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala#L84 attempts to exhaustively match on all possibly types, but there's no extractor for LazyRef in tasty-reflect.
@romanowski What is this code used for?
@nicolasstucki is there a good way to handle all types? In the compiler a common pattern is to match on TypeProxy
and recurse on .underlying
but I don't see a TypeProxy in tasty-reflect.
Maybe the type extractors could skip a LazyRef? But then we would have no natural recursion brake anymore.
attempts to exhaustively match on all possibly types, but there's no extractor for LazyRef in tasty-reflect. @romanowski What is this code used for? @nicolasstucki is there a good way to handle all types? In the compiler a common pattern is to match on
TypeProxy
and recurse on.underlying
but I don't see a TypeProxy in tasty-reflect.
The code you attached is meant to construct showable representation of type (strings and links). LazyRefs probably need to be handled there to avoid MatchErrors.
Compiler version
Minimized code
build.sbt
project/build.properties
Foo.scala
Output
run
sbt doc
Expectation