Closed
Description
Compiler version 3.0.0-RC3
Minimized example
import scala.scalajs.js
class Foo(a: String, b: js.UndefOr[String]):
def this(b: js.UndefOr[String]) = this("default", b)
Output
[error] -- Error: src/main/scala/Main.scala:4:41 ---------------------------------------
[error] 4 | def this(b: js.UndefOr[String]) = this("default", b)
[error] | ^^^^^^^^^^^^^
[error] |undefined: this # -1: TermRef(ThisType(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),module class <empty>)),class Foo)),<init>) at readTasty
[warn] one warning found
[error] one error found
Expectation
This code compiles correctly - so it seems DottyDoc should handle it correctly.