Yes, it won't compile. This is just java...if you have two different class hierarchy and you do something like this SomeClass obj = new SomeOtherClass (), will result in a compile time error. It is the same thing you have mentioned.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!