Bug 9374 – 'super' should be accessible inside template constraint

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-22T17:57:00Z
Last change time
2013-01-22T23:03:19Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-01-22T17:57:11Z
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(); }
Comment #1 by k.hara.pg — 2013-01-22T19:55:17Z
Comment #2 by github-bugzilla — 2013-01-22T21:50:24Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c683f3b0bedcb89319759e0a236a0769ca7f2ca7 fix Issue 9374 - 'super' should be accessible inside template constraint