Scalac issues "forward reference not allowed from self constructor invocation" while dotc issues a different message. (RefCheck:874).
With scalac:
class A(a: Any) {
def this() = {
this(b) //forward reference not allowed from self constructor invocation
def b = new {}
}
}
With dotty:
Starting dotty REPL...
scala> class A(a: Any) {
def this() = {
this(b)
def b = new {}
}
}
3 | this(b)
| ^
| not found: b
Ev: https://scastie.scala-lang.org/lnrxIGq3SUCpoCXpUw3yGA