> ... and I found this quite surprising. ;-)

I'm guessing you come from a dynamic-languages background (Python, Ruby, JS...) 
What you're running into here is pretty fundamental to statically-typed OO 
languages — the difference between the _static_ type of an object reference, 
vs. the _dynamic_ type of the instance it points to at runtime. It occurs in 
Java, C++, Rust, Go, etc.

Reply via email to