[Issue 9374] New: 'super' should be accessible inside template constraint
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 22 17:57:13 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9374
Summary: 'super' should be accessible inside template
constraint
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: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-01-22 17:57:11 PST ---
Following code should work.
class C {}
class D : C
{
static bool test(C) { return true; }
void foo()() if (is(typeof(test(super)))) {}
void bar()() if (is(typeof(super) == C)) {}
}
void main()
{
auto d = new D();
d.foo();
d.bar();
}
--
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