Re: Is this actually valid code?

2011-11-07 Thread Trass3r
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?

Re: Is this actually valid code?

2011-11-07 Thread Steven Schveighoffer
On Sun, 06 Nov 2011 23:10:57 -0500, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I've had a simple problem where I've only wanted to override a setter from a base class: class Foo { @property void test(int) {} @property int test() { return 1; } } class Bar : Foo { override

Re: Is this actually valid code?

2011-11-07 Thread Andrej Mitrovic
Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^

Re: Is this actually valid code?

2011-11-07 Thread Trass3r
Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^ How? You can use using in C++ to do the same.

Re: Is this actually valid code?

2011-11-07 Thread Andrej Mitrovic
On 11/7/11, Trass3r u...@known.com wrote: Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^ How? You can use using in C++ to do the same. My bad. I was a bit over-excited there. :p

Is this actually valid code?

2011-11-06 Thread Andrej Mitrovic
I've had a simple problem where I've only wanted to override a setter from a base class: class Foo { @property void test(int) {} @property int test() { return 1; } } class Bar : Foo { override @property void test(int) {} void bartest() { auto x = test; } // NG } test.d(19):

Re: Is this actually valid code?

2011-11-06 Thread Jonathan M Davis
On Monday, November 07, 2011 05:10:57 Andrej Mitrovic wrote: I've had a simple problem where I've only wanted to override a setter from a base class: class Foo { @property void test(int) {} @property int test() { return 1; } } class Bar : Foo { override @property void