[Issue 16376] New: The specifications misses for overload resolution order in mixin templates
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Aug 11 12:14:19 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16376
Issue ID: 16376
Summary: The specifications misses for overload resolution
order in mixin templates
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
In this code
template F1(T)
{
void bar() {}
}
template F2(T)
{
mixin F1!T;
void foo() { bar(); } // F3.bar or F1.bar ?
}
template F3(T)
{
mixin F2!T;
void bar() {} //
}
struct F4(T)
{
mixin F3!T;
}
the specifications don't state which bar() will be called in this case. While
an identified mixin allows to call accurately one of the overload the default
behavior is not at all specified.
We would expect the manual to explain which rule is followed in this case even
if the rule is "no rule".
--
More information about the Digitalmars-d-bugs
mailing list