[Issue 13862] New: function is not callable using argument types ()
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Dec 14 10:01:52 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13862
Issue ID: 13862
Summary: function is not callable using argument types ()
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: ellery-newcomer at utulsa.edu
the code:
template _dumb(I, string m, string op) {
I _dumb(I amin, I amax, I bmin, I bmax) {
return amin;
}
}
template dumb(I, string m, string op) {
alias dumb = _dumb!(I,m,op)._dumb;
}
void main(){
dumb!(uint, "max", "|")(1,2,3,4);
}
the compile:
dmd bitall.d # dmd 2.066.1, 2.067 beta
the fireworks:
bitall.d(8): Error: _dumb (uint amin, uint amax, uint bmin, uint bmax) is not
callable using argument types ()
bitall.d(8): Error: _dumb (uint amin, uint amax, uint bmin, uint bmax) is not
callable using argument types ()
bitall.d(12): Error: template instance bitall.dumb!(uint, "max", "|") error
instantiating
the workaround:
replace the inner _dumb with a non-eponymous name.
--
More information about the Digitalmars-d-bugs
mailing list