Following interface and classes are successfully compiled. Problem is mentioned in the output below :
interface MyInterface{} class MyClass imp
The cast (Object)mi will always succeed so why should you be required to provide it?