Little example:
Here's the error:
Seriously, it's like extending a class without getting parent's methods and properties: totally useless.
And i find the struct extension very useful in many situations.
Code:
struct BaseStruct { var bool IsUsed; structdefaultproperties { IsUsed = false } }; struct AnotherStruct extends BaseStruct { //add some other stuffs }; var BaseStruct A; var AnotherStruct B; function SetUsed(out BaseStruct S) { S.IsUsed = true; } function MyFunction() { SetUsed(A); //ok SetUsed(B); //error }
Code:
Error, Call to 'SetUsed', parameter 1: Type mismatch in Out variable
And i find the struct extension very useful in many situations.
Comment