Scala

Scala

Made by DeepSource

Consider using uninitialized instead of _ for uninitialized fields in Scala 3 SC-R1078

Anti-pattern
Major

The underscore token was used for uninitialized fields in Scala 2. However, beginning with Scala 3, it is recommended that you use scala.compiletime.uninitialized instead. While the old syntax is still supported, it will be dropped in the future Scala 3 versions.

Bad Practice

var t: T = _

Recommended

var t: T = uninitialized

Reference