Re: Non-conflicting derived class overload shadows base class method

2017-03-20 Thread Jonathan M Davis via Digitalmars-d
On Monday, March 20, 2017 20:13:12 Adam D. Ruppe via Digitalmars-d wrote: > On Monday, 20 March 2017 at 19:57:03 UTC, H. S. Teoh wrote: > > Is this a bug? > > No, that's intentional, you have to merge the overload sets with > alias, same as if you imported them from two separate modules. > >

Re: Non-conflicting derived class overload shadows base class method

2017-03-20 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 20 March 2017 at 19:57:03 UTC, H. S. Teoh wrote: Is this a bug? No, that's intentional, you have to merge the overload sets with alias, same as if you imported them from two separate modules. http://dlang.org/hijack.html

Non-conflicting derived class overload shadows base class method

2017-03-20 Thread H. S. Teoh via Digitalmars-d
Is this a bug? class A { int method(); } class B : A { override void method(int); } void main() { B b; b.method(123); // OK int x = b.method(); // NG } One