[Issue 7825] New: Hijacking of functions by non-function templates.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 4 17:04:02 PDT 2012
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 at puremagic.com
ReportedBy: dsimcha at yahoo.com
--- Comment #0 from David Simcha <dsimcha at 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: -------
More information about the Digitalmars-d-bugs
mailing list