I have something like:
class A { }
class B extends A { }
Then I'm trying to cast an instance of A to B:
var a:A = obtainAInstance();
var b:B = B(a);
To this, I get the following error:
TypeError: Error #1034: Type Coercion failed: cannot convert A to B.
What could the cause of this be?