Is this actually valid code?

Trass3r un at known.com
Mon Nov 7 03:30:54 PST 2011


> class Foo
> {
>     @property void test(int) {}
>     @property int test() { return 1; }
> }
>
> class Bar : Foo
> {
>     alias super.test test;
>     override @property void test(int) {}
>     void bartest() { auto x = test; }
> }
>
> And it actually works! Is this a documented feature?

http://d-programming-language.org/hijack.html


More information about the Digitalmars-d-learn mailing list