Skip to content

scaladoc error when parsing code, using promise.then #12579

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
rssh opened this issue May 23, 2021 · 3 comments
Closed

scaladoc error when parsing code, using promise.then #12579

rssh opened this issue May 23, 2021 · 3 comments

Comments

@rssh
Copy link
Contributor

rssh commented May 23, 2021

Compiler version

3.0.0

Minimized code

package x

import scalajs.*

class MyClass:

   def fun(x:scala.Any): Unit =
     x match
       case p: js.Promise[_] =>
          p.`then`( x => println(x), e => println(e) )
       case _ =>
          println(x)

Output

trying to generate documentation

info] welcome to sbt 1.5.2 (N/A Java 15.0.2)
[info] loading global plugins from /Users/rssh/.sbt/1.0/plugins
[info] loading settings for project scalajs-then-doc-build from plugins.sbt ...
[info] loading project definition from /Users/rssh/tests/dotty/scalajs-then-doc/project
[info] loading settings for project root from build.sbt ...
[info] set current project to test (in build file:/Users/rssh/tests/dotty/scalajs-then-doc/)
[info] Main Scala API documentation to /Users/rssh/tests/dotty/scalajs-then-doc/target/scala-3.0.0/api...
[warn] Setting -bootclasspath is currently not supported.
[error] -- Error: src/main/scala/x/X.scala:10:10 ---------------------------------------
[error] 10 |          p.`then`( x => println(x), e => println(e) )
[error]    |          ^^^^^^^^
[error]    |undefined: p.then # -1: TermRef(TermRef(NoPrefix,val p),then) at readTasty
[warn] one warning found
[error] one error found
[error] (Compile / doc) DottyDoc Compilation Failed

Expectation

Documentation should be generated without error.

@rssh rssh added the itype:bug label May 23, 2021
@rssh
Copy link
Contributor Author

rssh commented May 23, 2021

scalajs-then-doc.tar.gz

full sbt project.
run

sbt doc

to reproduce.

@griggt
Copy link
Contributor

griggt commented May 23, 2021

Looks like a duplicate of #11943

@smarter
Copy link
Member

smarter commented May 23, 2021

Closing as duplicate

@smarter smarter closed this as completed May 23, 2021
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