Open
Description
reproduction steps
using Scala 2.13.3, 2.12.12
class Cls[@specialized(Float) A] private () {
override def clone(): Cls[A] = new Cls[A]()
}
problem
The code does not compile, the error returned is:
constructor Cls in class Cls cannot be accessed in class Cls$mcF$sp
Access to protected constructor Cls not permitted because
prefix type Cls[Float] does not conform to
class Cls$mcF$sp where the access takes place
override def clone(): Cls[A] = new Cls[A]()
Changing the constructor from private to protected does not help.
The code is compiled without error using dotty 0.27.0-RC1