Closed
Description
Dotty accepts the first two constructors, while they are rejected by Scala2:
class A(x: Int, y: Int) {
def this() = { // only Dotty
this()
}
def this(x: Long) = { // only Dotty
this(x.toInt)
}
def this(a: Int) = { // both Dotty & Scala2
this(a, a)
}
}
A related question: do we allow 2nd constructor for traits?