Skip to content

Spurious MatchError warning in scala3doc #12690

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
jphmrst opened this issue Jun 2, 2021 · 2 comments
Closed

Spurious MatchError warning in scala3doc #12690

jphmrst opened this issue Jun 2, 2021 · 2 comments

Comments

@jphmrst
Copy link

jphmrst commented Jun 2, 2021

Compiler version

SBT 1.5.3, Scala 3.0.0

Minimized code

trait AAA[Y]
class BBB
def f[MM <: AAA[MM]](): BBB = new BBB

Output

The compiler gives no warnings/errors, but the doc target in sbt (right out of sbt new scala/scala3.g8, no additions to build.sbt) gives a warning,

[warn] -- Warning: src/main/scala/Main.scala:4:4 --------------------------------------
[warn] 4 |def f[MM <: AAA[MM]](): BBB = new BBB
[warn]   |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[warn]   |scala.MatchError: LazyRef(...) (of class dotty.tools.dotc.core.Types$LazyRef)
[warn]   |      at dotty.tools.scaladoc.tasty.TypesSupport.dotty$tools$scaladoc$tasty$TypesSupport$$inner(TypesSupport.scala:262)
[warn]   |      at dotty.tools.scaladoc.tasty.TypesSupport.inner$$anonfun$5(TypesSupport.scala:190)
[warn]   |      at scala.collection.immutable.List.map(List.scala:246)
[warn]   |      at dotty.tools.scaladoc.tasty.TypesSupport.dotty$tools$scaladoc$tasty$TypesSupport$$inner(TypesSupport.scala:190)

Expectation

I'd expect no warnings here --- this seems like an internal matter.

@griggt
Copy link
Contributor

griggt commented Jun 2, 2021

Duplicate of #12327. Fixed in 3.0.1-RC1.

@griggt griggt closed this as completed Jun 2, 2021
@som-snytt
Copy link
Contributor

Per https://gitter.im/scala/scala?at=60b7cefb3d43a15a65de67fb

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

No branches or pull requests

3 participants