March 07, 2013 [Issue 9657] New: static if (is(typeof(&method))) broken with "final" and template mixins | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: thecybershadow@gmail.com --- Comment #0 from Vladimir Panteleev <thecybershadow@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: ------- |
Copyright © 1999-2021 by the D Language Foundation