Lets say I have the following code:
abstract class Animal
case class Dog(name:String) extends Animal
var foo:Animal = Dog("rover")
var bar:Dog = foo //ERROR!
How do I fix the last line of this code? Basically, I just want to do what, in a C-like language would be done:
var bar:Dog = (Dog) foo