April 05, 2012 [Issue 7825] New: Hijacking of functions by non-function templates. | ||||
---|---|---|---|---|
| ||||
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: ------- |
Copyright © 1999-2021 by the D Language Foundation