digitalmars.D.bugs - [Issue 7825] New: Hijacking of functions by non-function templates.
- d-bugmail puremagic.com (38/38) Apr 04 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7825
http://d.puremagic.com/issues/show_bug.cgi?id=7825 Summary: Hijacking of functions by non-function templates. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: dsimcha yahoo.com --- Comment #0 from David Simcha <dsimcha yahoo.com> 2012-04-04 17:04:39 PDT --- // traits.d: module plot2kill.traits; template defaultInit(T) { enum defaultInit = 1; } // subplot.d: import plot2kill.traits; import plot2kill.gtkwrapper; class Subplot : FigureBase { override void toWidget() { defaultInit(); } } // gtkwrapper.d: module plot2kill.gtkwrapper; void defaultInit() {} abstract class FigureBase { void toWidget() {} } $ dmd traits.d gtkwrapper.d subplot.d traits.d(3): Error: template plot2kill.traits.defaultInit(T) is not a function template -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 04 2012