[Issue 13580] New: alias missing in overloaded homonym template
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Oct 6 12:33:05 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13580
Issue ID: 13580
Summary: alias missing in overloaded homonym template
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << CODE
template memoize(alias fun)
{
alias Args = int;
void memoize(Args args) {}
}
template memoize(alias fun, uint maxSize)
{
alias Args = int;
void memoize(Args args) {}
}
void regex(string pattern)
{
memoize!(regex)(pattern);
}
CODE
dmd -c bug
----
bug.d(4): Error: undefined identifier Args
bug.d(10): Error: undefined identifier Args
----
--
More information about the Digitalmars-d-bugs
mailing list