Is there a way to mix a trait into an existing object in either Dotty or Scala?
class SomeClass
trait SomeTrait
// This works, but it's not what I'm looking for:
new SomeClass with SomeTrait
// This is what I'm looking for, but it breaks:
val someClass = new SomeClass
someClass with SomeTrait
This answer provides a macro solution, but it's 7 years old, and I'm hoping (fingers crossed!) for something simpler.