Open
Description
% scala -version
Scala code runner version 3.1.1 -- Copyright 2002-2022, LAMP/EPFL
Case class allows case-field with name productArity without any warning/error. This silently breaks functionality of Product.
It is not obvious that case class extends Product and field with productArity should not be used.
Suggestion: make productArity illegal as a case-field or at least warning.
Example:
object Bug {
case class Problem(productArity : Int)
def main(args : Array[String]) : Unit = {
val cc = Problem(42)
println("wtf?: "+cc.productArity) //42
}
}