Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 27, 2016 [dmd-internals] Module.semantic is not virtual | ||||
---|---|---|---|---|
| ||||
Attachments:
| Hi all, Class Module contains the member functions semantic(), semantic2, and semantic3() that are not virtual. They have the same name however as the Dsymbol virtual methods. Because Module inherits from Dsymbol, it is confusing to reuse the names. Clang warns about Module's functions hiding the virtual methods of the parent class. What was the intent here? Should Module's semantic functions override the base class's functions (but then why the *final* Package::semantic()?), or should they be separate function and just be renamed to something more clear? thanks, Johan |
July 30, 2016 Re: [dmd-internals] Module.semantic is not virtual | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen Attachments:
| No-one knows?
On Wed, Jul 27, 2016 at 8:50 PM, Johan Engelen <jbc.engelen@gmail.com> wrote:
> Hi all,
> Class Module contains the member functions semantic(), semantic2, and
> semantic3() that are not virtual. They have the same name however as the
> Dsymbol virtual methods. Because Module inherits from Dsymbol, it is
> confusing to reuse the names. Clang warns about Module's functions hiding
> the virtual methods of the parent class.
>
> What was the intent here? Should Module's semantic functions override the base class's functions (but then why the *final* Package::semantic()?), or should they be separate function and just be renamed to something more clear?
>
> thanks,
> Johan
>
>
|
July 31, 2016 Re: [dmd-internals] Module.semantic is not virtual | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen | They're just separate functions that happen to use the same name. They're never going to be called through a reference typed as Dsymbol (I hope). On Sun, Jul 31, 2016 at 4:26 AM, Johan Engelen via dmd-internals <dmd-internals@puremagic.com> wrote: > No-one knows? > > On Wed, Jul 27, 2016 at 8:50 PM, Johan Engelen <jbc.engelen@gmail.com> wrote: >> >> Hi all, >> Class Module contains the member functions semantic(), semantic2, and >> semantic3() that are not virtual. They have the same name however as the >> Dsymbol virtual methods. Because Module inherits from Dsymbol, it is >> confusing to reuse the names. Clang warns about Module's functions hiding >> the virtual methods of the parent class. >> >> What was the intent here? Should Module's semantic functions override the base class's functions (but then why the *final* Package::semantic()?), or should they be separate function and just be renamed to something more clear? >> >> thanks, >> Johan >> > > > _______________________________________________ > dmd-internals mailing list > dmd-internals@puremagic.com > http://lists.puremagic.com/mailman/listinfo/dmd-internals _______________________________________________ dmd-internals mailing list dmd-internals@puremagic.com http://lists.puremagic.com/mailman/listinfo/dmd-internals |
July 31, 2016 Re: [dmd-internals] Module.semantic is not virtual | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy | On 31 Jul 2016, at 5:18, Daniel Murphy via dmd-internals wrote: > They're just separate functions that happen to use the same name. They're never going to be called through a reference typed as Dsymbol (I hope). Yep. We should just rename Module.semantic. — David _______________________________________________ dmd-internals mailing list dmd-internals@puremagic.com http://lists.puremagic.com/mailman/listinfo/dmd-internals |
Copyright © 1999-2021 by the D Language Foundation