Bug 7825 – Hijacking of functions by non-function templates.

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-04T17:04:39Z
Last change time
2024-12-13T17:59:25Z
Assigned to
No Owner
Creator
David Simcha
Moved to GitHub: dmd#18431 →

Comments

Comment #0 by dsimcha — 2012-04-04T17:04:39Z
// 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
Comment #1 by robert.schadek — 2024-12-13T17:59:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18431 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB