[Issue 9657] New: static if (is(typeof(&method))) broken with "final" and template mixins
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 6 16:42:35 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9657
Summary: static if (is(typeof(&method))) broken with "final"
and template mixins
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2013-03-07 02:42:34 EET ---
mixin template InnerMixin()
{
void method() {}
}
mixin template OuterMixin()
{
final: // This is important for some reason
mixin InnerMixin;
// For some reason, this assert passes,
// even though the "static if" does not
static assert(is(typeof(&method)));
// Uncomment this line to get things working:
//void moreMagic() {}
static if (!is(typeof(&method)))
static assert(false, "No 'method' in current context");
}
class Class
{
mixin OuterMixin;
}
--
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