D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7825 - Hijacking of functions by non-function templates.
Summary: Hijacking of functions by non-function templates.
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 17:04 UTC by David Simcha
Modified: 2024-12-13 17:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2012-04-04 17:04:39 UTC
// 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 dlangBugzillaToGithub 2024-12-13 17:59:25 UTC
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