Open KAYLukas opened 10 years ago
We can ensure that the object n has an interface INode by defining a union in the structdef as follows: union{ Class* class; Class* __IMPLEMENTS_INTERFACE_INode; } This ensures in compile time that via can only be used on objects which implements the interface. Otherwise you should cast this.
unions can included recursively, if necessary to implement this
The implementation and class keyword need to be updated to support VTables for function calls.