Extensions only apply when their namespace is in scope, though.
I agree, but it is dangerous.
I am going to look if I can port my VB code for shadow classes (allows for a kind of inheritance of sealed classes) that I build a few years ago - see if I can do it with an aspect; code will be like:
[Shadows(MySealedClass)]
type MyClass = public Class
public method ReimplementedMethod;
end;
Everything that is not defined will behave as it did in the MySealedClass - Should be easier with Oxygene then it was with VB because of the duck-typing.
1 Like